<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><div>I patched this issue in a quick way.<br></div><div><br></div><div>The problem is that when the layer beign hidden mqlayermanager add a css attribute: visibility->hidden.</div><div>When the user increase the opacity of the layer, mplayermanager instead of remove visibility attribute leave it and append a new opacity attribute.</div><div><br></div><div>I abandoned the visibility approach and I patched in jquery.mapquery.mqLayerManager.js, at line 260, with this:</div><div><br></div><div> //update legend image</div><div> layerElement.find('.mq-layermanager-element-legend img').css(</div><div> {opacity:layer.visible()?true:0});</div><div> },</div></span></div><div style="font-family: 'times new roman', 'new
york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">as commented in </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><a href="https://github.com/mapquery/mapquery/pull/17">https://github.com/mapquery/mapquery/pull/17</a><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Volker sorry if my approach is almost rude but I've no Time to understand appropriately all the signals/events for manage the widget in a elegant way.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Now I'd want to patch the RootContainer...</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div> <div
style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">Da:</span></b> Volker Mische <volker.mische@gmail.com><br> <b><span style="font-weight: bold;">A:</span></b> Giuseppe De Marco <peppelinux@yahoo.it> <br><b><span style="font-weight: bold;">Cc:</span></b> "mapquery@lists.osgeo.org" <mapquery@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Inviato:</span></b> Mercoledì 16 Maggio 2012 17:28<br> <b><span style="font-weight: bold;">Oggetto:</span></b> Re: [MapQuery] mqLayerManager: visibility checkbox doesn't work<br> </font> </div> <br>It's indeed a bug, but as it was so simple I fixed it:<br><a href="https://github.com/mapquery/mapquery/pull/17"
target="_blank">https://github.com/mapquery/mapquery/pull/17</a><br><br>Please leave a comment if it works for you, then I'll merge it.<br><br>BTW: The code of the LayerManager is not really that good, it could<br>simplified a lot. I'd be happy if anyone would refactor it :)<br><br>Cheers,<br> Volker<br><br>On 05/16/2012 05:06 PM, Giuseppe De Marco wrote:<br>> Yes, you're right<br>> <br>> that's my mistake.<br>> Now layer set visibility to false when checkbox is unchecked but label<br>> doesn't back visibile when layer has been activated later.<br>> <br>> know bug or something missing again ?<br>> <br>> Thank You Volker<br>> <br>> ------------------------------------------------------------------------<br>> *Da:* Volker Mische <<a ymailto="mailto:volker.mische@gmail.com" href="mailto:volker.mische@gmail.com">volker.mische@gmail.com</a>><br>> *A:* Giuseppe De Marco <<a
ymailto="mailto:peppelinux@yahoo.it" href="mailto:peppelinux@yahoo.it">peppelinux@yahoo.it</a>><br>> *Cc:* "<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a>" <<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a>><br>> *Inviato:* Mercoledì 16 Maggio 2012 16:26<br>> *Oggetto:* Re: [MapQuery] mqLayerManager: visibility checkbox doesn't work<br>> <br>> Hi Giuseppe,<br>> <br>> have you checkout also the dependencies? It sounds like the<br>> jquery.tmpl.js plugin is missing.<br>> <br>> Cheers,<br>> Volker<br>> <br>> On 05/16/2012 03:31 PM, Giuseppe De Marco wrote:<br>>> Hi Volker,<br>>><br>>> the last version of mapquery raises this error:<br>>><br>>> jquery.mapquery.mqLayerManager.js:37<br>>><br>> <<a
href="http://localhost:8080/JsLib/mapquery-0.1/jquery.mapquery.mqLayerManager.js" target="_blank">http://localhost:8080/JsLib/mapquery-0.1/jquery.mapquery.mqLayerManager.js</a>>Uncaught<br>>> TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no<br>>> method 'template'<br>>><br>>> The old version not<br>>><br>>> ------------------------------------------------------------------------<br>>> *Da:* Volker Mische <<a ymailto="mailto:volker.mische@gmail.com" href="mailto:volker.mische@gmail.com">volker.mische@gmail.com</a><br>> <mailto:<a ymailto="mailto:volker.mische@gmail.com" href="mailto:volker.mische@gmail.com">volker.mische@gmail.com</a>>><br>>> *A:* Giuseppe De Marco <<a ymailto="mailto:peppelinux@yahoo.it" href="mailto:peppelinux@yahoo.it">peppelinux@yahoo.it</a> <mailto:<a ymailto="mailto:peppelinux@yahoo.it"
href="mailto:peppelinux@yahoo.it">peppelinux@yahoo.it</a>>><br>>> *Cc:* "<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a>>"<br>> <<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapquery@lists.osgeo.org" href="mailto:mapquery@lists.osgeo.org">mapquery@lists.osgeo.org</a>>><br>>> *Inviato:* Mercoledì 16 Maggio 2012 11:59<br>>> *Oggetto:* Re: [MapQuery] mqLayerManager: visibility checkbox doesn't work<br>>><br>>> On 05/15/2012 10:43 PM, Giuseppe De Marco wrote:<br>>>> I noticied that the visibility checkbox doesn't work.<br>>>> First I thought that was the Jquery I use but later I saw this
behavior<br>>>> in <a href="http://mapquery.org/demo/" target="_blank">http://mapquery.org/demo/</a> too.<br>>>><br>>>> Is it a feature that needs to be developed yet ?<br>>><br>>> Hi Giuseppe,<br>>><br>>> this was indeed a bug. Though it is fixed in the most recent version.<br>>> Please checkout the most recent one from Github [1].<br>>><br>>> [1] <a href="https://github.com/mapquery/mapquery" target="_blank">https://github.com/mapquery/mapquery</a><br>>><br>>> Cheers,<br>>> Volker<br>>><br>>><br>>><br>> <br>> <br>> <br><br><br><br> </div> </div> </div></body></html>