[MapQuery] Layer Controller Widget Options and Labeling

Justin Penka jpenka at sdrmaps.com
Tue Jun 21 13:45:18 EDT 2011


Something I have been interested in getting opinions on regards the
flexibility of the Layer Controller Widget. For instance, I rarely want
to give my end users the ability to delete a map layer from the map,
especially if there is no way for them to get it back after they delete
it. Additionally I often generate my layer labels as separate layers,
this gives the user the ability to deactivate labeling that may
interfere with the map itself and also allows me the opportunity to set
the levels of zoom that I would like the labeling to appear on a dynamic
basis. 

 

In the old version I managed to do this by overriding the .template used
for drawing the layer controller. I know Volker isn't a huge fan of this
method and it certainly has plenty of drawbacks. For instance I added an
additional checkbox next to the visible checkbox to represent the
labeling of the layer visibility, and removed the delete button from the
custom template. Unfortunately because the template is so heavily linked
to the core code anytime an activity occurred, such as moving a layer
the widget would revert back to the default template and remove any
changes included by my template.

 

It would appear that overriding the template is perhaps not the best
approach. I think it would be good if we could have options associated
with each layer in the layer controller to activate or deactivate the
various options. (ie delete button, visibility checkbox, or possible
layer label checkbox). Open to opinions, ideas and suggestions..

 

-Justin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapquery/attachments/20110621/e99b0345/attachment.html


More information about the MapQuery mailing list