Moving map to another div

378 views
Skip to first unread message

Leonid Rozenblyum

unread,
Jun 15, 2010, 4:42:07 AM6/15/10
to Google Maps JavaScript API v3
Map has no functionality of destroying a single map in the ajax page
(GUnload destroys everything).

So I'll try to reuse the map object once created.

Could I reuse the same map object in different div's in my
application? Is it possible to reassign parent div of the map.

Ricky Manwell

unread,
Nov 2, 2011, 5:09:07 PM11/2/11
to google-map...@googlegroups.com
I am trying to do something similar.  I want to be able to make multiple map objects, place markers and change which one map is displayed in the map div.

Hoping this post will bump this topic.

Rossko

unread,
Nov 2, 2011, 10:18:32 PM11/2/11
to Google Maps JavaScript API v3
> I am trying to do something similar.  I want to be able to make multiple
> map objects, place markers and change which one map is displayed in the map
> div.

Why would you do that, rather than just update the map already there
to show something else?

吴晓军

unread,
Nov 2, 2011, 10:41:41 PM11/2/11
to google-map...@googlegroups.com
hi, I just want to display some area with different color or something like that ,for example ,the china with red.I don't know how to do ,do you know how to do that?


Ricky Manwell

unread,
Nov 3, 2011, 1:08:58 PM11/3/11
to google-map...@googlegroups.com
I have a map with hundreds of markers and I want to show only a subset of them without having to loop through an array of markers to hide the ones I don't want to be seen.  

Basically I want a main map with all markers and a temporary map that will be recreated over and over again to display different subsets of markers.


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


Rossko

unread,
Nov 3, 2011, 1:57:42 PM11/3/11
to Google Maps JavaScript API v3
> I have a map with hundreds of markers and I want to show only a subset of
> them without having to loop through an array of markers to hide the ones I
> don't want to be seen.

I don't see a problem doing that on one map. In order to show a
subset somebody, somewhere will be iterating through the targets.

> Basically I want a main map with all markers and a temporary map that will
> be recreated over and over again to display different subsets of markers.

You can have as many maps as you like. You might hide and show them.
But to keep creating new maps is very inefficient, the overheads may
cause you to run out of resource.
Reply all
Reply to author
Forward
0 new messages