The easiest way to do this would be to check for the ClientLocation
and, if it's present, set your map center point to that location, as
below:
function init(){
var map=new google.maps.Map2(document.getElementById('mapEl',{...});
var latlng=google.loader.ClientLocation?new
google
.maps
.LatLng
(google
.loader.ClientLocation.lat,google.loader.ClientLocation.lng):new
google.maps.LatLng(fallbackLat,fallbackLng);
map.setCenter(latlng,13);
}
Jeremy R. Geerdes
Effective website design & development
Des Moines, IA
For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]
Unless otherwise noted, any price quotes contained within this
communication are given in US dollars.
If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!
And check out my blog, Adventures in Web Development, at
http://jgeerdes.blogspot.com
!
On Jun 24, 2009, at 8:04 PM, fast foodie wrote:
>
> should be easy to do, but I can't figure it out. i wish to mash up
> these two things:
>
> Google Bar
> http://code.google.com/apis/maps/documentation/examples/control-googlebar.html
>
> with localization,,,
>
> http://code.google.com/apis/ajax/documentation/#ClientLocation
>
>
>
> how can I do it? or is it not possible?
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---