I'm trying to get the scale of a simple base map.
ArcGISMap map = new ArcGISMap(SpatialReferences.getWebMercator());
map.setBasemap(Basemap.createImagery());
map.setMaxScale(MAX_DISPLAYABLE_SCALE);
MapView mapView = new MapView();
mapView.setMap(map);
The scale returned by the following code seems to be inaccurate and I cannot figure out why.
mapview.addMapScaleChangedListener(scale->System.out.println(scale.getSource().getMapScale()));
Using this code: GitHub - Esri/arcgis-runtime-toolkit-java: Runtime Java SE toolkit, I was able to display a scale bar which seems to be of the right length.
Am I doing something wrong? Did I forget something?