This project has moved and is read-only. For the latest updates, please go here.

Open Discussion - AjaxMap and OpenLayers

Topics: SharpMap v0.9 / v1.x, SharpMap v2.0, Web Controls
Feb 16, 2008 at 10:18 AM
Hello list!

I don't know if any of you has seen openlayers already. It is an excelent javascript map-client. But... it lacks one great thing that the sharpmap ajaxmap has:
- The fading effect when zooming in and out on the map!

My wish would be to combine the ajaxMap and openLayers because this would mean an extremely functional webmap-client. Why?
- OpenLayers supports combining a lot of map sources (WMS, WFS) from the FRONT end. As compared to how SharpMap currently works, this would mean that a request for a certain layer from the web-map client would ONLY pass my IIS-server for those particular layers hosted on my server instead of adding "foreign" WMS server-side before returning the mapimage.

In the future I hope this will lighten the load for our server.

Has anyone tried doing something with OpenLayers before? Or do you have some general remarks or ideas? Would it be an option to offer the way the ajaxmap works to the openlayers community and see if they can use it?

Feb 16, 2008 at 1:16 PM
You could use SharpMap as WMS server and use openlayers to show data using WMSLayer.
Tile fade and so on are openlayers functions that could be added to openlayers js code, so maybe you could ask metacarta for this functions.
Feb 17, 2008 at 2:29 PM
Open Layers is a good client api. I have been looking into this with a view to using it with Sharp Map 2. A while ago I did some preliminary work wrapping the OpenLayers library into Asp.Net server controls which worked ok but..

So far I have only done enough to draw a google map to screen with some of the tools and event handlers.

At some point the consumer of the library will force the page to postback and so far I have not added any state tracking.

The resulting script is neither OpenLayers.Ajax or Ms Ajax but somewhere in between - (I originally intended to convert the code to be 'pure' Ms Ajax but it was very slow to do and error prone). While this is not necessarily a problem it does mean a developer used to working with Ms Ajax will find it does not follow the Ms documentation (which is sketchy at best..)

Quite a lot of work will need to be done to aggregate sm layers into the openlayers scheme. For instance if you have 50 layers rendered by sharp map you probably want them to be rendered as one set of tiles instead of 50 sets of overlayed tiles. (This is only a problem when you want to allow the user the option to choose the rendered layers).

For the time being it is on the back burner but I do see some promise in using it and intend to get back to it at some point. HTH jd