Re[mapguide-users] freshing a map/layer... from server side,
avoiding JavaScript
Maksim Sestic
max at geoinova.com
Tue Nov 13 07:50:10 EST 2007
Kenneth, you're 100% right about this - I tried to give it a run with a
custom viewer but also gave up :-) somewhere in the middle since good server
push implementation is sooo specific.
Also, thank you for sharing this JavaScript example. I'm currently using
similar approach, but alas, ASP.NET somehow hates frames and at the end it
all seems overcomplicated. It's about building a development testbed for
some MG-based application and I'm trying to come up with a clean API for it.
Regards,
Maksim Sestic
Kenneth, GEOGRAF A/S wrote:
>
> I don't think that it is the MG libraries that lack the "push", it is
> the HTTP protocol/Web browser that is not well suited for this.
>
> There are ways to perform a server push, but it is uncommon, so examples
> can be hard to find.
> The problem would be getting the viewer to respond to such pushes.
>
> If you design your own viewer, you can do just that.
> Building a simple viewer is easier than it sounds, you just have to call
> the "GETMAPIMAGE" operation, and supply the parameters.
> You can do this without any server side code, or without any client side
> code (you will need code somewhere though).
>
> From your other message, you worry about the syncronization.
> If you want the refresh to be in sync with the server call, you can use
> a structure like this:
>
> client:
> document.getElementById('hiddeniframe').location.href =
> 'loooongoperation.aspx?action=go';
>
> server:
> lenghty_operation_call();
> Response.Clear();
> Response.Write("<html><body><script>parent.document.getElementById('mapstuff').Refresh();</script></body></html>");
> Response.Flush();
>
> This will ensure that the map is not refreshed until the actual server
> operation completes.
> You can modify it to be more "AJAX" like, but the overall approach still
> applies.
>
> Regards, Kenneth, GEOGRAF A/S
>
>
>
> Maksim Sestic skrev:
>> Just one more thing to add... :-) I don't understand why MG libraries
>> lack
>> that "push" functionality. If there's a session established, then there's
>> a
>> way to influence the representation of a map as user sees it -
>> refreshing,
>> panning, zooming, all sorts of pre and post-processing... using existing,
>> server-side MG functionality. Currently I'm forced to turn to scripting
>> languages for majority of the tasks. Such code is _hard_ to maintain.
>> Take,
>> for example, a vehicle tracking system.
>>
>> Regards,
>> Maksim Sestic
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://www.nabble.com/Refreshing-a-map-layer...-from-server-side%2C-avoiding-JavaScript-tf4782233s16610.html#a13725073
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list