layers in ajax panel

Apr 26, 2008 at 6:49 AM
Hi,

"I am trying to display the set of all layers on an ajax panel with checkboxes, but for some reason the checkboxes don't enable or disable layers. How can I enable or disable a layer when I click the checkbox?"


Thanks in dvance.



Apr 27, 2008 at 5:33 PM
A year, or maybe more, ago there was someone who had ajaxified sharpmap with a layerpanel and a measure function. I believe it was Norm or Mnorm?

Googling for it did not show up anything, it was on the old site's forum, so,...

Anyone has a 'current' version of that? Sirisha can learn out of that.
Apr 27, 2008 at 7:35 PM
Yes, you can get it here:
http://sharpmap.martinrinner.de
Apr 27, 2008 at 9:49 PM
Edited Apr 27, 2008 at 9:56 PM
Bingo, that's the one :o)

Thanks Martin.

Just found also: http://www.codeplex.com/SharpMap/WorkItem/View.aspx?WorkItemId=14165

Does anyone have some editing functions implemented?
Jan 21, 2009 at 4:39 AM
Hey Martin,

I tried the sharpmap example you posted on your website regarding the State of Washington.  How do you turn the layers on/off and refresh the map accordingly.  It didn't seem to work when I tried it.  Thanks.

Jan 21, 2009 at 4:39 AM
Hey Martin,

I tried the sharpmap example you posted on your website regarding the State of Washington.  How do you turn the layers on/off and refresh the map accordingly.  It didn't seem to work when I tried it.  Thanks.
Jan 29, 2009 at 6:50 AM
Hi All,

I am having the same trouble as Floyd.

When UseCache is true, the image comes through, all zooming etc.. works fine, but the layers are not turned on and off dynamically (which, I think is expected in that mode).
When UseCache is false to have the layers dynamically turned on and off with the new image being streamed through to the web page I get the alert error: Stack overflow at line: 164

I think these issues are pretty closely related.
Any one have any ideas?


Coordinator
Jan 29, 2009 at 10:07 AM
Edited Jan 29, 2009 at 10:11 AM
Hi Bill, I dont really use the ajax map control but I wouldnt think useCache will really help - the chances of hitting the same extents twice are very slim - it is far more useful for 'embedded map' type applications where the same extents need to be served many times (no panning zooming etc.)

To help debug your issue click:
 in vs click on the Debug menu
click the Exceptions option
Tick the thrown checkbox for 'Common Language Runtime Exceptions'
Run the app in debug mode - you may find that there are a lot of errors from things like template parsing etc.. these can be very tedious (you can disable specific errors in the dialog box above) but you should get a better message about what is really going on...

I would imagine (I havent really looked into it) the stack overflow is due to the ajax control having an onError handler on the image (which tries to download the image again) which gets called repeatedly because the server isnt responding correctly.
You could enhance this onError handler by implementing a counter and stop calling if a limit has been reached.

hth jd