ABOUTDEVELOPERS |
SpatialStream® Code Examples
Adding Label Layer
The example below shows how to add a SpatialStream™ Parcel APN as label layer using the Mapbox GL addLayer function.
GetMap
var layers = map.getStyle().layers;
var firstLayerId = layers[layers.length - 1].id; map.addSource("samplesite.dmp/parcels", { type: "raster", tiles: [ Dmp.Env.Connections["SS"].getBaseUrl() + "GetMap.aspx?width=256&height=256&layers=samplesite.dmp/parcels&z={ z }&y={y }&x={x }&SLD=samplesite.dmp.styles.parcels/labels.sld.xml&ss_candy="+Dmp.Env.Connections["SS"]._candy], tileSize: 256, map.addLayer( { id: "ss-parcel", type: "raster", source: "samplesite.dmp/parcels", paint: {}, firstLayerId ); Run Sample Back To Index |