I am currently building a simple web application with the Boundless OpenGeoSuite SDK ol3view (Openlayer3 viewer) and I was able to get one layer to show up from my geoserver instance but I would like to know how to show more than just one layer. This is the code in the app.js that I have so far of the layer showing right now. The other layers are in the same workspace on geoserver with varying geometry field types.
// ========= config section ================================================var url = '/geoserver/ows?';var featurePrefix = 'Campus'; //workspacevar featureType = 'Basemap'; //layer namevar featureNS = 'Campus1'; //namespacevar srsName = 'EPSG:900913'; //projectionvar geometryName = 'the_geom'; //geometry typevar geometryType = 'MultiLineString'; //field typevar fields = ['layer']; //columnsvar layerTitle = 'layer';var infoFormat = 'application/vnd.ogc.gml/3.1.1'; // can also be 'text/html'var center = [-10764594.758211, 4523072.3184791];var zoom = 3;// =========================================================================
Does anyone have an example in the code for the app.js that would show how to add multiple layers and or a group layer?
أكثر...
// ========= config section ================================================var url = '/geoserver/ows?';var featurePrefix = 'Campus'; //workspacevar featureType = 'Basemap'; //layer namevar featureNS = 'Campus1'; //namespacevar srsName = 'EPSG:900913'; //projectionvar geometryName = 'the_geom'; //geometry typevar geometryType = 'MultiLineString'; //field typevar fields = ['layer']; //columnsvar layerTitle = 'layer';var infoFormat = 'application/vnd.ogc.gml/3.1.1'; // can also be 'text/html'var center = [-10764594.758211, 4523072.3184791];var zoom = 3;// =========================================================================
Does anyone have an example in the code for the app.js that would show how to add multiple layers and or a group layer?
أكثر...