Select to view content in your preferred language

Trying to obtain Javascript code from ArcGIS Online without having any basemap

899
6
Jump to solution
08-20-2012 02:28 PM
SmaranHarihar
Deactivated User
I was able to add my shapefile to the ArcGIS Online and obtained the Javascript Code but now I do not want to have any basemap, only my shapefile. I did try adding my shapefile as basemap in the ArcGIS Online but then the shapefile loses the enable popup feature. Is there anyway I can resolve this issue? :confused:
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Deactivated User
If you're using that webmap with createMap, the simplest thing to do is get a reference to your basemap layer and call hide.

To get a reference to your basemap layer, pull the layerId out of map.layerIds and pass that to map.getLayer.

View solution in original post

0 Kudos
6 Replies
derekswingley1
Deactivated User
In the writing a class conceptual help topic there's an example that shows how to use only a feature layer in a map:  http://servicesbeta.esri.com/demos/using-classes-with-javascript/legacy/empty_basemap.html

Is that similar to what you want?
0 Kudos
SmaranHarihar
Deactivated User
In the writing a class conceptual help topic there's an example that shows how to use only a feature layer in a map:  http://servicesbeta.esri.com/demos/using-classes-with-javascript/legacy/empty_basemap.html

Is that similar to what you want?


Right I was able to create this, but the reason I specified ArcGIS Online is because I have the required Web App ready with all the features and layout. Now I wish to only remove the basemap and I am good to go. So I am using the map-id and not sure how I can remove the basemap in the javascript code that I downloaded from the ArcOnline. So this is the map and I simply wish to get rid of the basemap and keep everything else intact
0 Kudos
derekswingley1
Deactivated User
If you're using that webmap with createMap, the simplest thing to do is get a reference to your basemap layer and call hide.

To get a reference to your basemap layer, pull the layerId out of map.layerIds and pass that to map.getLayer.
0 Kudos
SmaranHarihar
Deactivated User
If you're using that webmap with createMap, the simplest thing to do is get a reference to your basemap layer and call hide.

To get a reference to your basemap layer, pull the layerId out of map.layerIds and pass that to map.getLayer.


Thanks Derek, that does it.
0 Kudos
derekswingley1
Deactivated User
You're welcome. Can you post this as an answer to your question over on gis.se?
0 Kudos
SmaranHarihar
Deactivated User
You're welcome. Can you post this as an answer to your question over on gis.se?


Absolutely
0 Kudos