need to reload google map onclick event.

1,027 views
Skip to first unread message

Nishit Soni

unread,
Feb 20, 2010, 9:20:16 AM2/20/10
to Google AJAX APIs
Hi,

I want to reload the google map onclick event using javascript.

Please let me know what do I need to do.


Thanks
Nishit Soni

Jeremy Geerdes

unread,
Feb 20, 2010, 9:38:01 AM2/20/10
to google-ajax...@googlegroups.com
Without knowing exactly what you're trying to do, it should be sufficient to call map.clearOverlays() and recall map.setCenter with your initial center point, zoom level and map type. If your map is more complex, you could just recall your initialization function. Use GEvent.addListener to establish your click listener. For more information about pretty much all of this, you can check in the docs:

http://code.google.com/apis/maps/documentation/reference.html

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jrge...@gmail.com

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

> --
> You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
> To post to this group, send email to google-ajax...@googlegroups.com.
> To unsubscribe from this group, send email to google-ajax-searc...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
>

sebastian de comocomo

unread,
Feb 21, 2010, 8:26:22 AM2/21/10
to google-ajax...@googlegroups.com
Hi Jeremy & Soni,

I'm trying to do the same with the Store Finder.

I want to recall map.setCenter

When people move the map, refresh Stores based on new Center.

I don't know how to detect that the user moved the map.

http://allmybookings.com/distance_maps_01.php

Thanks
Sebastian

Reply all
Reply to author
Forward
0 new messages