I don't think that you can achieve that.
The closest thing you can do is to issue code on the client that refreshes the map,
after calling the index increment.

However, the Refresh() method is invoked in an asyncron manner.
This means that your code will continue to execute before the map is actually loaded:

mapFrame.Refresh();
i++; //This line will be executed before the actual map is updated.
server.Increment(); //So will this
mapFrame.Refresh(); //This will most likely abort the loading of the previous map, and execute before the index has incremented

This means that you will have to hook up to the MapLoaded event.

Secondly, I'm guessing that the speed will be horrible if you want to animate using the server rendering.
Instead, you should pre-create overlay images for the map.
Then load each image in an invisible part of the screen.
Once all images are loaded, you can safely animate the map overlays.

Regards, Kenneth, GEOGRAF A/S



dorra2007 skrev:
Thank you for the suggestion but parent.mapFrame.Refresh() dosn't work
also....Is there other solutions!!!!!!


Ivan Milicevic-3 wrote:
Try callling javascript form code behind before your indeks is
increased. For example:

...
Response.Write("<script>parent.mapFrame.Refresh();</script>);
...

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dorra2007
Sent: Saturday, November 10, 2007 1:10 PM
To: [email protected]
Subject: re[mapguide-users] fresh map/layer


How to trigger map refresh without any mouse event or other events.
Mglayer.ForceRefresh() doesn't work neither mapFrame.Refresh();
The refresh action occurs at the end of page load; while I need to
refresh
the map or the layer while the servlet is executing.

In other words; In my code I embed a for loop which inserts new row in a
postgis database, each time the index increased; I need to refresh the
map
before increasing the index; so that the map looks as animated.

Any suggestion is welcome;
Regards. --
View this message in context:
http://www.nabble.com/refresh-map-layer-tf4782343s16610.html#a13681426
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users



_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to