Select to view content in your preferred language

Public Information Map 2.0 - how to change basemap (wkid problem)?

726
1
07-09-2012 05:05 AM
Jaros_awKowalczyk
Emerging Contributor
Hi, i wanna change the basemap from default to another. The default's map (with url http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer) has wkid like 102100. My basemap has another wkid like 2180. What files do i have to edit to change that default basemap. I mean basemap which is in the 1st row, 1st column of the Basemap Gallery.
What i tried:
in ./src/config/advanced/basemaps.js
changed:
{
  uniqueID: 'top',
  title: 'Topographic',
  thumbnail: 'images/basemap/topographic.jpg',
  services: [
   {
    url: 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer'
   }
  ]
 },

with:
{
  uniqueID: 'top',
  title: 'Topographic',
  thumbnail: 'images/basemap/topographic.jpg',
  services: [
   {
    url: 'http://myserver.com/ArcGIS/rest/services/MyMap/MapServer'
   }
  ]
},


my_wkid = 2180;


in ./src/config/advanced/application.js
// Spatial Reference WKID
userConfig.spatialRef = my_wkid; // before was 102100

i changed also proxy to php proxy, because i'm using PHP.
userConfig.proxyURL =  './resources/proxy.php';


./js/embed.js has some variables about spatialRef, but firstly i wanna repair visibilty of changed map so i i'll skip it...


in ./src/js/tasks.js
i changed this:
extent: startExtent,

to this:
extent: esri.geometry.geographicToWebMercator(startExtent),


and i made an edit here

if(!userConfig.spatialRef){
 userConfig.spatialRef = my_wkid; // before was 102100
}


in ./src/js/cluster.js
"spatialReference": {
 "wkid": my_wkid // before was 102100
}


But basemap is not changing at all. What am i doing wrong? Do I have to make changes in proxy.php?
0 Kudos
1 Reply
Jaros_awKowalczyk
Emerging Contributor
I solved the problem by changing basemaps from Tiled to Dynamic in mapBasemaps.js file.
Topic can be closed.
0 Kudos