|
POST
|
Without accessing the data its not easy for me to diagnose why this is happening. If you can't make the service available to me, then its is worth contacting your local distributor (Esri India?), or our tech support to get a reproducer complete with the data.
... View more
09-18-2023
01:51 AM
|
0
|
0
|
1893
|
|
POST
|
It's hard for me to diagnose without accessing the service. For the service which does work, is the spatial reference different to the one which does work? Not having a basemap I suspect is the cause of the issue. Looking at the service definition of the service you are having trouble with I can see it is in wgs84 (Spatial Reference: 4326 (4326)). I wonder if you initialise the map to the spatial reference which matches the service it might make it work. ArcGISMap map = new ArcGISMap(SpatialReferences.getWgs84());
... View more
09-14-2023
06:43 AM
|
0
|
2
|
1920
|
|
POST
|
I can't see a basemap being displayed in your application above. Are you using a basemap or are you just displaying the feature service on its own? Would you be able to share your feature service?
... View more
09-14-2023
05:54 AM
|
0
|
1
|
1923
|
|
POST
|
@MaheshP I've taken a quick look at your code, but it isn't complete. The code which initialises the bikeTrailRenderer is missing. I've assumed you are using a SimpleRenderer here and managed to get the service working using the following code: private static final String GEOLOGY_FEATURE_SERVICE =
"https://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/9";
@Override
public void start(Stage stage) {
try {
// create stack pane and application scene
StackPane stackPane = new StackPane();
Scene scene = new Scene(stackPane);
// size the stage, add a title, and set scene to stage
stage.setTitle("Feature Layer Feature Service Sample");
stage.setHeight(700);
stage.setWidth(800);
stage.setScene(scene);
stage.show();
// authentication with an API key or named user is required to access basemaps and other location services
String yourAPIKey = System.getProperty("apiKey");
ArcGISRuntimeEnvironment.setApiKey(yourAPIKey);
// create a map with the terrain basemap style
ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_TERRAIN);
// create a map view and set the map to it
mapView = new MapView();
mapView.setMap(map);
// set a viewpoint on the map view
mapView.setViewpoint(new Viewpoint(new Point(-13176752, 4090404, SpatialReferences.getWebMercator()), 500000));
// create feature layer with its service feature table
// create the service feature table
ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(GEOLOGY_FEATURE_SERVICE);
// create the feature layer using the service feature table
FeatureLayer featureLayer = new FeatureLayer(serviceFeatureTable);
SimpleLineSymbol bikeTrailSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.DASH, 0xffff0000, 2.0f);
SimpleRenderer bikeTrailRenderer = new SimpleRenderer(bikeTrailSymbol);
featureLayer.setRenderer(bikeTrailRenderer);
// add the feature layer to the map's operational layers
map.getOperationalLayers().add(featureLayer);
// add the map view to stack pane
stackPane.getChildren().add(mapView);
} catch (Exception e) {
// on any error, display stack trace
e.printStackTrace();
}
} If this works fine, then I'd start looking at your WMTS layer to see if that is causing the issue. There is a WMTS sample here which you can look at.
... View more
09-14-2023
03:53 AM
|
0
|
0
|
1943
|
|
POST
|
@PRAVEENPATNANA The code in the sample for downloading tiled packages can be modified to change the area and the level of detail in the offline basemap, but this is only for portions of the basemap and there are limits to the amount of data you can download. Before we look into using ArcGIS Pro we need to understand what you are trying to achieve so we can guide you to the best solution. So far I've established you have some shapefile data and you want to display this over a basemap in an application which has no network connectivity. Is this correct? The next step is to understand a little more about your workflow and the area of the basemap you want and the detail. You can't simply download an entire basemap for the whole world at all levels of detail; this would take huge amounts of storage. So can you tell me the kind of basemap sizes you are wanting and the levels of detail you need in your application?
... View more
08-11-2023
01:18 AM
|
0
|
7
|
3673
|
|
POST
|
@PRAVEENPATNANA if you want to view a basemap offline, you need to use a tile package. This is something @Nicholas-Furness has provided links to: You can find an example here: https://developers.arcgis.com/java/sample-code/export-tiles/ In that code, an area of the basemap is downloaded (exported) as a TPK (you can learn more about that here), and used to create a new basemap and a new map. Once it's downloaded to your device, you can just use it whenever you create a new map. If you need more help with this, please ask a new question as requested previously. Have you been able to use this sample?
... View more
08-10-2023
10:55 AM
|
0
|
1
|
3689
|
|
POST
|
The API key needs to be set earlier in the app. Make it the very first thing that happens before you use any of the esri mapping funcationality.
... View more
07-28-2023
03:13 AM
|
0
|
1
|
1523
|
|
POST
|
One thing a colleague has pointed out is you might not be using the APIKey correctly: I think it will work better if you just put the API key into the string like this: String apiKey = "AAPK...."
... View more
07-28-2023
01:18 AM
|
0
|
1
|
2293
|
|
POST
|
A couple more questions: - Have you managed to get it working with the data we include in the sample? - Is the issue only with you data, or all shapefiles?
... View more
07-28-2023
12:33 AM
|
0
|
1
|
2298
|
|
POST
|
@PRAVEENPATNANA I'm suspecting a data issue. I've tried to send you a message so maybe I could get a copy of your data to see what is going on.
... View more
07-27-2023
01:13 PM
|
0
|
1
|
2310
|
|
POST
|
I can't see anything obviously wrong with your code and its looks very similar to the sample we have. Have you managed to get our sample working? This example does work with the data we've included, so I'm wondering if this is an issue with your data? Are you seeing any error messages on the console. You've got a few potential places you output messages if the shapefile fails to load. Is the shaefile complete? A shapefile needs to be used alongside other files which it originally came with. If you just have a .shp file on its own, this will not work. If you use the data in our sample you will see what a complete shapefile will look like.
... View more
07-27-2023
04:04 AM
|
0
|
3
|
2321
|
|
POST
|
@UogianMbdin Just starting to look at your question. I'm not sure you are using the Maps SDK for Java as this doesn't work on an Android device. You are either using version 100.x of the ArcGIS Runtime API for Android or possibly version 200.1 of the Maps SDK for Kotlin. If you tell which it is, I'll get. you sorted. Thanks Mark
... View more
07-10-2023
09:12 AM
|
0
|
0
|
1200
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-13-2024 05:17 AM | |
| 1 | 07-10-2024 01:50 AM | |
| 1 | 04-22-2024 01:21 AM | |
| 1 | 04-18-2024 01:41 AM | |
| 1 | 12-05-2023 08:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-12-2025
07:13 PM
|