Select to view content in your preferred language

Adding a WMS layer from a 3rd party to ArcGIS via Javascript API

1306
1
01-15-2014 02:04 PM
AndrewJones2
New Contributor
Hi,

Does ArcGIS support adding a WMS layer via the Javascript API from for example this vendor (they provide parcel data): http://spatialstream.com/samples/PSexamples.aspx

See their code examples under "Adding Parcel WMS Layer" for like Bing Maps v7

If you run their sample code and look at the source code you'll see this is how they're adding the layer so does this work with ArcGIS?

        map = new Microsoft.Maps.Map(
            document.getElementById("myMap"),
            {
                credentials: "AiH9x2VVCUZnVQPP3vYungOm7PgMCfqhdQMCgjviuBsotpZAhCWeitlskEMbkQxG",
                center: new Microsoft.Maps.Location(33.9, -117.9),
                zoom: 16,
                mapTypeId: "r"
            }
        );

        function afterLoad() {
           
            layer = new Dmp.Layer.WmsLayer("Parcels", "SS");
            layer.addChild("ParcelTiles", "DMP_LICENSE/Parcels", "", { zIndex: 3, zoomRange: { min: 16, max: 19} });
            map.addEntity(layer);
           
        }
0 Kudos
1 Reply
StephenLead
Honored Contributor
Yes, the ArcGIS JS API supports WMS layers - see https://developers.arcgis.com/en/javascript/jsapi/wmslayer-amd.html which also links to some examples.
0 Kudos