error OpenLayers.Control.LayerSwitcher is not a constructor

1,260 views
Skip to first unread message

Rolf Fankhauser

unread,
Aug 17, 2013, 4:50:46 AM8/17/13
to geoadm...@googlegroups.com
Hi all,

I wanted to add a layer switcher control

var layerSwitcher = new OpenLayers.Control.LayerSwitcher();
api3.map.addControl(layerSwitcher);

but I get the error 'OpenLayers.Control.LayerSwitcher is not a constructor'.

Is layer switcher not supported in the API?

Thanks for your help!

Rolf

Cédric MOULLET

unread,
Aug 19, 2013, 12:03:02 AM8/19/13
to geoadm...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "GeoAdmin API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Rolf Fankhauser

unread,
Aug 25, 2013, 4:59:32 AM8/25/13
to geoadm...@googlegroups.com
Thanks Cédric!

I loaded the full API (src="https://api.geo.admin.ch/loader.js?mode=full") then it was working.



Reply all
Reply to author
Forward
0 new messages