<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I don't think that you can achieve that.<br>
The closest thing you can do is to issue code on the client that
refreshes the map,<br>
after calling the index increment.<br>
<br>
However, the Refresh() method is invoked in an asyncron manner.<br>
This means that your code will continue to execute before the map is
actually loaded:<br>
<br>
<tt>mapFrame.Refresh();<br>
i++; //This line will be executed before the actual map is updated.<br>
server.Increment(); //So will this<br>
mapFrame.Refresh(); //This will most likely abort the loading of the
previous map, and execute before the index has incremented<br>
</tt><br>
This means that you will have to hook up to the MapLoaded event.<br>
<br>
Secondly, I'm guessing that the speed will be horrible if you want to
animate using the server rendering.<br>
Instead, you should pre-create overlay images for the map.<br>
Then load each image in an invisible part of the screen.<br>
Once all images are loaded, you can safely animate the map overlays.<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
dorra2007 skrev:
<blockquote cite="mid:13702669.post@talk.nabble.com" type="cite">
<pre wrap="">Thank you for the suggestion but parent.mapFrame.Refresh() dosn't work
also....Is there other solutions!!!!!!
Ivan Milicevic-3 wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Try callling javascript form code behind before your indeks is
increased. For example:
...
Response.Write("<script>parent.mapFrame.Refresh();</script>);
...
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] On Behalf Of dorra2007
Sent: Saturday, November 10, 2007 1:10 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
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:
<a class="moz-txt-link-freetext" href="http://www.nabble.com/refresh-map-layer-tf4782343s16610.html#a13681426">http://www.nabble.com/refresh-map-layer-tf4782343s16610.html#a13681426</a>
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>