Select to view content in your preferred language

Switch basemap WKID to 3440

1357
1
Jump to solution
10-04-2016 01:52 AM
Abdul_Razakck
Deactivated User

Hi,

I am a web application developer new to ESRI javascript API. My company wants to use ESRI Map service to plot their data in Map. I have achieved all my requirement with ESRI javascript API except setting custom SpatialReference.  because my company is using a specific system: PSD93 so I want to set a custom WKID: 3440 with the basemap:"topo" to complete the requirement.

Thanks in advance

please see my below code:

var map, toolbar, symbol, geomTask, linesymbol, customExtentAndSR, sr, webutil; require(["esri/map","esri/toolbars/draw","esri/dijit/BasemapGallery","esri/graphic","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/symbols/CartographicLineSymbol","esri/symbols/PictureMarkerSymbol","dojo/parser""dijit/registry","dijit/layout/BorderContainer""dijit/layout/ContentPane","dijit/form/Button""dijit/WidgetSet""dojo/domReady!""esri/SpatialReference""esri/geometry/Extent"], function ( Map, Draw, BasemapGallery, Graphic, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, CartographicLineSymbol, PictureMarkerSymbol, parser, registry, SpatialReference, webMercatorUtils, Extent ) {     parser.parse();


var
 bounds = new esri.geometry.Extent({             "xmin": 180203.8880,             "ymin": 1859530.0038,             "xmax": 809128.4715,             "ymax": 2923231.7211,             "spatialReference": { "wkid": 3440 }         });

Snippet

var renewPoint = new esri.geometry.Point(defaultLong, defaultLat, new esri.SpatialReference({ "wkid": 3440 }));         
map = new Map("map", {             basemap: "topo",             center: [defaultLong, defaultLat], zoom: defaultZoom, force3DTransforms: true        });
});
0 Kudos
1 Solution

Accepted Solutions
thejuskambi
Frequent Contributor

All the basemaps hosted on Arcgis Online are Cached services. That means you cannot use it with a spatial reference other than it is defined.

If you would like to show the map in a custom spatial reference than you would have to create your own map service for basemap.

View solution in original post

1 Reply
thejuskambi
Frequent Contributor

All the basemaps hosted on Arcgis Online are Cached services. That means you cannot use it with a spatial reference other than it is defined.

If you would like to show the map in a custom spatial reference than you would have to create your own map service for basemap.