epyks23,
I do not understand why this would work. I do not know what "L" is.
Surely your base map needs to be added inside "new ol.Map({"? It looks
to me like you have two Map instances for a single "map" div. Try
something like this tiled WMS example:
http://openlayers.org/en/v3.12.1/examples/wms-tiled.html
GetMap is supported automatically by creating an "ol.Map".
GetFeatureInfo requires a JavaScript event handler to call
ol.source.TileWMS.getGetFeatureInfoUrl.
This example shows how to use GetFeatureInfo with tiled WMS (although I
think the code no longer matches the sever configuration; can you get it
to work with topp:states as in the previous example?):
http://openlayers.org/en/v3.12.1/examples/getfeatureinfo-tile.html
I have found many great ideas in the OpenLayers 3 examples:
http://openlayers.org/en/v3.12.1/examples/
Kind regards,
Ben.
On 02/01/16 17:54, epyks23 wrote:
> Thanks for the explanation. I understand the functionality of WMS.
>
> map.html <http://osgeo-org.1560.x6.nabble.com/file/n5243444/map.html>
> layerswitcher.js
> <http://osgeo-org.1560.x6.nabble.com/file/n5243444/layerswitcher.js>
>
> (I do not see the layer in my map).
>
> Do I need to put additional code for GetMap and GetFeatureInfo ?
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/layerswitcher-js-and-adding-vector-data-from-Geoserver-tp5243249p5243444.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
--
Ben Caradoc-Davies <[email protected]>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users