javascript - how can I use php to create Latlng with address for google map V3 -


I've done a lot but can not find the way to create latlng in Google Maps below, how can I use Lategeng Address for the number?

The script is

initialize the function () {var latlng = new google.maps.LatLng (-41.251290,174.803638); Var select = {center: latlng, zoom: 10, mappethip id: google.maps.MapTypeId.ROADMAP, disabledAutopain: wrong, navigationTontol: correct, navigation controloption: {style: google.maps.NavigationControlStyle.SMALL}, map type control: true, Map type controlOption: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}}; Var map = new google.maps.Map (document.getElementById ("map"), opt); Var marker = new google.maps.marker ({status: new google.maps.LatLng (-41.251290,174.803638), title: "codeglobe", clickable: right, map: map});

Many thanks!

Use your web services API <

That supports cross-site ..? Whatever, I'm sure you can see the appropriate function)

and then parse the results with json_decode I think the function is .. a while I've touched PHP since

Sigh Let the man

  $ address = "1600 Amphitheater Parkway, Mountain View, CA"; $ Url = "http://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($=address).&&s=sensor=false"; $ Result_string = file_get_contents ($ url); $ Result = json_decode ($ result_string, true); list ($ axis, $ long) = $ result ['geometry'] ['location'];  

Something I did not test it , But give it a whirl. The 5 lines of code.


Comments