POST
|
Thanks Mark, it helps a lot. How do you alter the shapefile to delete an attribute?
... View more
06-09-2020
06:55 AM
|
0
|
1
|
471
|
POST
|
Hello, I have downloaded the shapefile from this page: Block Group Low Moderate 2000 I try to load it to my map by doing that: File shapefile = new File(System.getProperty("data.dir"), "address"); ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable(shapefile.getAbsolutePath()); // use the shapefile feature table to create a feature layer FeatureLayer layer = new FeatureLayer(shapefileFeatureTable); layer.addDoneLoadingListener(() -> { System.out.println("Layer Loading : " + layer.getLoadStatus()); if (layer.getLoadStatus() == LoadStatus.LOADED) { mapView.setViewpoint(new Viewpoint(layer.getFullExtent())); } else { Platform.runLater(new Runnable() { @Override public void run() { ArcGISRuntimeException loadError = layer.getLoadError(); Throwable Cause = loadError.getCause(); String alertMessage = "(" + layerId + ") '" + portalItemID.title + "' Layer Error : " + loadError.getMessage() + (Cause == null ? "" : (" - Cause: " + Cause.getMessage())); loadError.printStackTrace(); if(Cause != null) Cause.printStackTrace(); Alert alert = new Alert(AlertType.ERROR, alertMessage); alert.show(); } }); } }); layer.addLoadStatusChangedListener(new LoadStatusChangedListener() { @Override public void loadStatusChanged(LoadStatusChangedEvent loadStatusChangedEvent) { System.out.println("(" + layerId + ") '" + portalItemID.title + "' LoadStatusChangedListener : "+ loadStatusChangedEvent.getNewLoadStatus().name()); } }); mapView.getMap().getOperationalLayers().add(layer); But, it doesn't work. I got the following message: ArcGISRuntimeException: The field already exists.: FID It also says: Licensed For Developer Use Only Would that be the cause? Thank you for your help?
... View more
06-08-2020
02:42 PM
|
0
|
3
|
545
|
POST
|
Hi Mark, I do not necessarily need an offline app. This issue I have for this specific case ( https://jhaccoun.maps.arcgis.com/home/item.html?id=21127a4bac744997b257b6f2aea1a2bb) is that there are no elements or popup that give any information when you click on them. Identify Layer Result List Elements Size : 0 Identify Layer Result List Popups Size : 0 While there should be since they are available online. See here ( Trouble to access contents of a feature ) So for some maps, there is no list Elements. As said by Gayle Young, "[this] data you see in the ArcGISOnline Popup may be configured specifically for that application and may not be part of the service data." This is why I am looking for a different option like shapefile, hoping I could have access to these popups/elements.
... View more
06-08-2020
11:51 AM
|
0
|
1
|
566
|
POST
|
Hello Mark, Thank you for answering. On the link below, if can click on Download -> Shapefile. Florida Demographic Information There you download a .shp file, which you can after turn into a FeatureLayer. I was wondering if all ArcGis map could be downloaded as a shapefile. The link I gave in my 1st post is concerning a Map Image Layer. And in this case, I did not see an option to download as a shapefile. So I wondered : Is a shapefile available for download for each Map Image Layer? And for my specific case, is a shapefile available for download? I hope I have been more clear. Thank you for your help.
... View more
06-05-2020
01:18 PM
|
0
|
3
|
566
|
POST
|
Hello, is a shapefile available for download for each Map Image Layer? I have trouble to find the one for this one: https://jhaccoun.maps.arcgis.com/home/item.html?id=21127a4bac744997b257b6f2aea1a2bb Is it available? Thank you for your help, Julien
... View more
06-03-2020
03:05 PM
|
0
|
5
|
692
|
POST
|
Thank you for your answer. How do you go to Item Details->Layers? Is it a website? or attribute of an object? And, in the link the gave me, I see this is a MapServer. With this MapServer, I see, following your direction I can have access to Feature Layer. How do I get the ArcGISMap of these feature layer? Is there a PortalID? Adrien
... View more
03-05-2020
12:42 PM
|
0
|
0
|
814
|
POST
|
Hello Gayle, Thank you for your answer. My code does work for other WebMap. I have checked, there are no popups affiliated with this WebMap. I have used your method to check popups and it gave me no pop up for this webmap and for its sublayers.
... View more
03-05-2020
07:12 AM
|
0
|
1
|
814
|
POST
|
Hello, I am using Java Runtime 100.7. I have trouble with the WebMap which ID is ca8a15ea0bc2413396c322198d50fd1e. I can access it via AuthenticationManager. I am trying to see the selected feature when I click on a layer, but it seems the IdentifyLayerResult of his particular WebMap do not have the GeoElement necessary to read informations. Specifically I am trying to get access to this kind of informations: To access to the GeoElement, I am using this code: mapView.setOnMouseClicked(event -> { // check for primary or secondary mouse click if (event.isStillSincePress() && event.getButton() == MouseButton.PRIMARY) { // create a point from where the user clicked Point2D point = new Point2D(event.getX(), event.getY()); // identify the clicked features final ListenableFuture<List<IdentifyLayerResult>> results = mapView.identifyLayersAsync(point, 10, false, 10); results.addDoneListener(() -> { // System.out.println("Listener"); try { List<IdentifyLayerResult> ListLayer = results.get(); int j = 0; for (IdentifyLayerResult layer : ListLayer) { // search the layers for identified features List<Feature> features = layer.getElements().stream() .filter(geoElement -> geoElement instanceof Feature).map(g -> (Feature) g) .collect(Collectors.toList()); // select features int FeaturesSize = features.size(); for (int i = 0; i < FeaturesSize; i++) { Feature f = features.get(i); // printFeature_Info(f); String attributeNamePopUp = ""; try { attributeNamePopUp = layer.getLayerContent().getName(); } catch (java.lang.NullPointerException e) { } new ArcGIS_Information_Frame_For_Layer(f.getAttributes(), attributeNamePopUp); setupGraphicsOverlay(); List<Graphic> graphics = new ArrayList<>(); graphics.add(new Graphic(f.getGeometry())); graphicsOverlay.getGraphics().addAll(graphics); } } } catch (Exception e) { e.printStackTrace(); } }); } }); Thank you for your help, Adrien.
... View more
03-04-2020
12:45 PM
|
0
|
5
|
964
|
Online Status |
Offline
|
Date Last Visited |
02-03-2021
04:05 PM
|