Hi, I make the googlemap service in some device like mobile, so it has
a restriction about memory.
And, in googlemaps javascript API v3, it doesn't give a choice about
"continuous zoom" disable,

so My device is so slow about "continuous zoom"... when I want to zoom
in / out , the "continuous zoom" looks so slow ..

I decide to make my own solution.. and it was, when I zoom in/out,
then I make new map .

like, this. When I zoom in, then

map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);

(I increase zoom level at the previous step)

so It looks very nice, when I zoom in, then it response fast then the
"continuous zoom"


But, now I'm in trouble with the memory.

When I create a new map object,

It seems, take the new map image, and overwrite at the map, so the
image size is increasing very much,

(I said my device has small memory) so, when I zoom in / out 20 times,
then my application is out of memory.


I tried to remove the object, and then create object ,

rm = document.getElementById("map_canvas");
rm.parentNode.removeChild(rm);

var m = document.createElement("div");
m.id = "map_canvas";
m.style.width = ~; height = ~; ...
document.getElementById("mother div").appendChild(m);

map = new google.maps.Map(m, mapOptions);


then, the memory increasing is less, but it still increase.
(memory increase even when I move the map left or right, or go to
searching point)

I think this is because in Javascript, rm.parentNode.removeChild
remove the element in DOM, but not in Memory, and system garbage
collection would remove it,

but it does not remove it right now.


Can I have another solution to solve this problem???

I give a long explanation, my summary is, I want to zoom cleary, not
use the continuous zoom.
so I create new map, but this use a lot of memory. So, I want to
remove the previous map image, but I don't know how to.

(or, another idea, instead of creating new map)


please anybody give me an idea..

thank you.

-- 
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 [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-maps-js-api-v3?hl=en.

Reply via email to