Select to view content in your preferred language

Not able to display shapefile

2449
1
09-08-2011 08:22 AM
dw2
by
Deactivated User
A sample program was created using the Eclipse Runtime Plugin and a couple lines of code was added for opening a local shapefile:


  LocalArcGISFeatureLayer localLayer = new LocalArcGISFeatureLayer("C:\\shapefile.shp", 0);
   
  _map.addLayer(localLayer);

The following error was found:

-------------------------------------------------------------------------
Starting server
Exe dir: C:\workspace\NewProject

Failed to find local server in the following locations:

C:\workspace\NewProject\Runtime400
Environment: ArcGISRuntime400

Stopping server
Local server exited, code: 0
-------------------------------------------------------------------------

It appears that a server needs to be started.  Need some instructions on that.
0 Kudos
1 Reply
GayleYoung
Esri Contributor
Hi,
thanks for your question. At the moment, ArcGIS Runtime supports displaying layers from sources such as a map package (.mpk), or an ArcGIS online service. We are expecting the source of the layer to be authored and published/shared. This means we do not currently support data such as shapefiles which have no associated symbology or renderer.
We are looking at various ways a future release might support shapefiles. One way would be for the client application to provide symbology/a renderer.

In terms of your local runtime server not starting up... If the runtime has been successfully installed, then you should have an environment variable called ArcGISRuntime400 which has the path that the runtime is installed to e.g C:\Program Files\ArcGIS\Runtime400\bin\ArcGISRuntime.exe
The runtime will then start-up automatically when you initialize a layer.

Please let me know if you have installed ArcGIS Runtime for Java and still do not have that environment variable.

Many thanks,
Gayle
0 Kudos