[OpenLayers-Users] Getting Control.Button to work

Janis Elmeris janis.elmeris at intelligentsystems.lv
Fri May 13 08:19:40 EDT 2011


Aviaron on Stack Overflow found the solution to this.

The problem was in styling: the button's style needs to be defined for 
class set by displayClass + "ItemInactive" attached as a postfix (as it 
seems there is no difference really between active and inactive items of 
the button type, there is no need to activate a button, thus only the 
"ItemInactive" postfix version applies); and also the panel itself must 
be styled (using class set by displayClass of the panel) so that the 
resulting button's DIV gets placed within the resulting panel's DIV.

Regards,
Janis

On 2011.05.11. 14:50, Janis Elmeris wrote:
>
> Hello!
>
> Thanks for the link! Tried it a bit, although not everything works, 
> e.g., the layer switchers do not appear, overview map does not appear, 
> the popped-up text has no background (and appears somewhat far from 
> the marker).
>
> But most importantly, the tool does not have an option to add a button 
> to the map that would then call some JS upon being clicked.
>
> Regards,
> Janis
>
>
> On 2011.05.11. 13:47, Parveen Arora wrote:
>> On Tue, May 10, 2011 at 7:20 PM, Janis Elmeris
>> <janis.elmeris at intelligentsystems.lv>  wrote:
>> Hello Janis,
>>> Can someone point me to the right direction, please, or post a working
>>> example? My non-working example is attached.
>> Try Slippy Map Generator
>> http://osmtools.de/easymap/
>> Try If this works for you, and further ask for help freely If required?
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110513/f87a3c86/attachment.html


More information about the Users mailing list