[MapQuery] mqLayerManager: visibility checkbox doesn't work

Volker Mische volker.mische at gmail.com
Sun May 20 13:24:18 EDT 2012


Thanks Giuseppe,

lets keep the discussion about this problem on the Github issue.

Cheers,
  Volker

PS: I could write it to every mail from you, but I think that's the most
appropriate one. Thanks for your time and effort you put into MapQuery
to make it better. Please keep the problems/questions comming.


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



More information about the MapQuery mailing list