Tax Parcel Viewer - how to add additional map services

2001
0
08-05-2015 12:50 PM
Labels (1)
PLadd
by
Occasional Contributor III

The Tax Parcel Viewer, while a great template/starting point, seems too restrictive in adding additional map services.  The BaseMap feature is nice but limiting.  I have a General basemap and an Aerial basemap.  If I want to show street names in both basemaps then I have to include this street name layer in each cached map service - and that's redundant.  Or if I want to include my Zoning map service, which consists of several layers, I can't use the Layers[] feature because that will only add a specific layer (i.e. /MapServer/0) within a map service.

Seems to me I should be able to add code like this onto js/homePage.js somewhere after line 230 but it's not working:

230: map = new esri.Map("map", { slider: true, infoWindow: infoWindow });

And add this.....

  var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapSer...", {

          "opacity" : 0.5,
         
"imageParameters" : imageParameters
       
});

        map
.addLayer(dynamicMapServiceLayer);

Part of the confusion is where to put the references to

"esri/layers/ArcGISDynamicMapServiceLayer",

and

function (
       
Map, ArcGISDynamicMapServiceLayer, ImageParameters) {

on js\homePage.js.  Anybody got any guidance for me?  Thanks.

0 Kudos
0 Replies