How to access .shp file from local computer or some other server.

374
1
02-08-2011 01:17 AM
MustafaNoor
New Contributor
Below is the code in which we can access a feature layer from ArcGIS sample server.

queryTask = new esri.arcgis.gmaps.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3");

But I want to access my own .shp file residing on my local computer or on another server, e.g this..

queryTask = new esri.arcgis.gmaps.QueryTask("http://172.20.100.12/Demo/Resources/ABC.shp");

In this case, queryTask does not return featureSet and so .shp file could not display on Map.

Can anybody help me .. where is problem and how i can fix it.
0 Kudos
1 Reply
derekswingley1
Frequent Contributor
Can't be done...you'll need to publish your .shp file as a map service.

The other possibility, if you're not dealing with a large number of features (let's say <1000), is to convert your features to .json, grab them and then display them as graphics on top of a basemap.
0 Kudos