.NET ADF WebMap Problem Part 2

Comments Off
Share

Well its a nice cold Sunday evening here in Wellington, absoutly nothing on television, and still recovering from last nights party, I thought I would continue talking about the WebMap problems.

So just a quick recap of where we were, so we have now a WebMap that was created using one of the constructors. And naturally we should be happy about this. Just be a little more clearer im going to say we used the following constructor to create the WebMap.

Construct a WebMap object with the specified IServerContext public WebMap(IServerContext,string,string);

And here comes the problem. Once you have the WebMap, and we ask it to draw the default extent. We run this and see what we get. Well it turns out that you get the map, but it looks like blobs!. Thats when you go, ok?.

Well this seems to be the default behaviour if the WebMap is created using a constructor. Trying to do the exact same thing, using the MapControl to crerate the WebMap, displays the map correctly!.
The workaround for this slight problem if you could call it a problem is that, you now need to set the ImageDescriptor properites. These properties are:

Webmap.ImageDescriptor.DPI
Webmap.ImageDescriptor.Height
Webmap.ImageDescriptor.ImageFormat
Webmap.ImageDescriptor.Width

So as you can see this can be a real pain, as in every time you have to set these options. Not very good if you have a MapControl.

This is only a small problem compared to this other one. I have noticed that with the this method (WebMap created from the constructor) it does not manage state for you automatically!. Now this I find a major problem!. Not sure whether to classify it as a bug?, or just a feature missing. Im sure you can imagine all the extra work of being able to manage extent.
The majority of the time and for simple applications managing state is alot easier. But when you working with a high end framework like we have in place, this makes it very hard. We have to create instances of local factories and using the interfaces, create function handlers, so we have immediately lost some features, like being able to maintain the state with something like the ViewState.

In our previous project that we completed, because of this and due to the complex nature of the architecture, we actually ended up writing our own WebMap class, rather than using the ESRI one. We added some other really cool features to it that we utilise else where.

Hopefully ESRI will address a few of the problems with the WebMap and we might see an updated version of this in the coming future, since this is a very core component on the WebControls that ArcGIS Server uses.

Comments Are Closed.