$(document).ready(function () { var map; require([ "esri/map", "esri/geometry/Extent", "esri/layers/FeatureLayer", "esri/SpatialReference", "esri/InfoTemplate", "dojo/domReady!" ], function ( Map, Extent, FeatureLayer, SpatialReference, InfoTemplate ) { initExtent = Extent(8110608.01, 1219530.57, 8893323.18, 2173464.68, new SpatialReference({ "wkid": 102100 })); map = new Map("map", { basemap: "topo", extent: initExtent, zoom: 7, slider: true, // Default Zoom in and Zoom out Enabled showLabels: true, logo: false, // Default ESRI symbol will not displayed // minZoom: 6, // To set the minimum level of zoom navigationMode: 'css-transforms', //For fast Rendering of Basemap fadeOnZoom: true }); // ALL attribute information display var template = new InfoTemplate(); // Costmuzied attribute information display // var template = new InfoTemplate("Information", "KFD Office Name: ${KFDOfficeName}
Department Code: ${DepartmentCode}"); // add the service URL here //var sampleURL1 = "https://kgis.ksrsac.in/kgismaps2/rest/services/KFDC/KFDC_Assets/MapServer/2"; var sampleURL = "https://kgis.ksrsac.in/kgismaps2/rest/services/KFDC/KFDC_Admin_Boundaries/MapServer/6"; var featureUrl = new FeatureLayer(sampleURL, { mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields: ["*"], //visible: true infoTemplate: template }); //var featureUrl1 = new FeatureLayer(sampleURL1, { // mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, // outFields: ["*"], // //visible: true // infoTemplate: template //}); map.addLayer(featureUrl); //map.addLayer(featureUrl1); }); });