Sunday, June 26, 2011

[Google Maps API v2] Re: center map on local user position

> -one is of course the disconnection between the variables for latitude and
> longitude of these two script.
> -and two,the javascript code of the geocoding start after the page loading
> is completed, and doesn't refresh the map.


I don't know anything about php, but I can tell you that you can
extract the individual latitude from a google.maps.LatLng variable
like this: yourvariablename.lat();

so I'm guessing that passing them to your php variables would look
like this:

$lat=latLong.lat();
$long=latLong.lng();

the js side works, but like I say, I have no idea what the php side
should look like.

as for the order that your page loads - you just have to change it
around so it works. The advice I gave you above was a little off but
here's one way of doing it (you can delete the showaddress and
getaddress functions if the infowindow is too spooky for you):
http://www.xelawho.com/map/clientaddress.htm

if you have problems in the future it's really much better to post a
link to your map (as stated in the posting guidelines) rather than
code.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate