// basemap
ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(URL_BASEMAP);
//pageLayout = new PageLayoutBean();
map.getLayers().add(tiledLayer);
String documentPath = "";
documentPath = "C:" + File.separator + "Users" + File.separator + "Structure" + File.separator + "Desktop" + File.separator + "isa" + File.separator + "application" + File.separator + "app" + File.separator + "now.mxd";
// if (pageLayout.checkMxFile(documentPath)) {
// pageLayout.loadMxFile(documentPath, null);
// }
// // (Map)pageLayout.getActiveView().getFocusMap();
// map.add(pageLayout);
map.getLayers().add(
new ArcGISLocalFeatureLayer( documentPath, 0,
RenderingMode.STATIC));
// graphics layer for taxi graphics
//Basically i need to load my shape file containing road map like one example moving graphic on custom map with .mxd extension 2012 java developer summit but i can figure out my way out
I have tried may scenarios but with no luck this is sample map where i want to move my points in java but even given sample source to load this in java
Solved! Go to Solution.
Denis,
It looks like your code is trying to directly access an MXD file. ArcGIS Runtime APIs can't read MXDs.
You can create Map Packages from within ArcMap. ArcMap can open your MXD and package the contents of that document into an .MPK file. That MPK can be opened in your Runtime app using a Local Server instance, as described in this example:
Local Server feature layer | ArcGIS for Developers
Or, you can read the shapefile directly (using version 10.2.4, which seems to be what you're using?). Here's an example:
Shapefile feature layer | ArcGIS for Developers
I hope this is helpful!
Denis,
It looks like your code is trying to directly access an MXD file. ArcGIS Runtime APIs can't read MXDs.
You can create Map Packages from within ArcMap. ArcMap can open your MXD and package the contents of that document into an .MPK file. That MPK can be opened in your Runtime app using a Local Server instance, as described in this example:
Local Server feature layer | ArcGIS for Developers
Or, you can read the shapefile directly (using version 10.2.4, which seems to be what you're using?). Here's an example:
Shapefile feature layer | ArcGIS for Developers
I hope this is helpful!
Thanks it will help me a lot.