Select to view content in your preferred language

Scalebar value changes with map move

6074
13
09-01-2011 03:55 PM
Labels (1)
MichaelErlich
Emerging Contributor
As you can see from the attached images, the scalebar shows 4 different values depending on where the map is dragged.  The zoom level never changed and the map data was from a tile pack.
0 Kudos
13 Replies
by Anonymous User
Not applicable
Original User: kscholefield

Do you have any other configuration files available for other projections with Tile Packs?  Or, are there any tools to create one, or an article that provides the details (rather than a summary of concept) that describes what the parameters mean in the xml files?


It is recommended not to edit the configuration .xml files. Changing projections of Tile Packages can be done in ArcMap by opening the .MXD in ArcMap and setting the Data Frame projection to the projection you want for the Tile Package. The Tile Package will need to be built and published again to reflect these changes. When the Tile Package is built it will reproject to your new projection. It�??s worth bearing in mind that if the Data Frame projection is different to the underlying data then during the tiling there may be a significant overhead from reprojection on the fly.


Also, it seems to me that this is not the proper way to present the scale line (just my opinion).  Compare/contrast to google/bing maps.  As you pan around on their maps, you will see the lengths of the scale line grow/shrink depending upon the center point of the map.  This seems to be a cleaner approach than the runtime control which keeps the scaleline width the same, but changes the distance value instead.  Keeping the distance label the same seems like it would be more intuitive for people that have no understanding of projections and mathematics.


We believe that the behaviour that the Scaleline exhibits is the same as the Google/Bing maps whereby the Scaleline grows and shrinks and the value changes. It is also possible to template the ScaleLine control using Styles as resources in the .xaml. Below there is sample .xaml of a Scaleline style allowing you to get a scale bar with metric units. It may be worth exploring this by copying the .xaml from the site below:

http://resourcesbeta.arcgis.com/en/help/runtime-wpf/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Cl...

Cheers

Kerrie
0 Kudos
MichaelErlich
Emerging Contributor
We believe that the behaviour that the Scaleline exhibits is the same as the Google/Bing maps whereby the Scaleline grows and shrinks and the value changes.


This is not the case.  Looking at how others display the scaleline.  Yahoo uses a projection so that the value and line stays the same no matter how the map is used.  Bing/Google/MapQuest change the width of the line, but keep the label the same.  ESRI changes the label (doesn't keep it the same).  This is what looks confusing when using the scaleline.
0 Kudos
by Anonymous User
Not applicable
Original User: mbranscomb

Hi,

I've just double checked and as far as I can tell, the scalebars/scalelines on Google Maps and Bing Maps behave in the the same manner as the ScaleLine control within the ArcGIS Runtime SDK for WPF. By this I mean that as you move further away from the equator, either north or south, the scale bar changes size until it reaches a specific threshold and then the label changes in order to maintain denominations of 100s or 1000s of km/mi. In all these cases the scalebar/line represents the value at the centre of current map extent. As discussed earlier, if you choose a projection in which distance is preserved (for example in the UK the British National Grid is used, across which distance measurements are consistent) then the ScaleLine control does not change.

The scalebar within Yahoo! Maps by comparison does not change as you pan north or south, and although I have not been able to confirm this, I suggest that because they use the same Web Mercator projection the scalebar value must represent the distance at the centre of the map only and not at the centre of the current map extent (often called the target). There's an announcement on the developer front page for Yahoo! Maps (http://developer.yahoo.com/maps/rest/V1/) stating that the service is shutting down on 13th September 2011 and developers are advised to migrate to the mapping site of Yahoo's partner, Nokia (http://maps.nokia.com), where interestingly the scalebar this behaves in the way as the others above, except that it waits until the map has stopped panning before it updates. This has the effect that if you pan quickly enough, you do not see it changing.

Having said all that, we greatly appreciate your feedback on the behaviour of the ScaleLine control and in future perhaps could consider additional properties on the control to fine tune such behaviour. You can actually view the source code for the ScaleLine control because the same toolkit is used within the ArcGIS API for SilverLight and has been made available on codeplex (http://esrisilverlight.codeplex.com/). 

Cheers

Mike
0 Kudos
MichaelErlich
Emerging Contributor
How do you change the data frame projection to be reflected in the tile packs?  The data frame projection is currently set to WGS 1984, but then gets converted to web mercator when the tile pack is created.  Am I missing a configuration somewhere?
0 Kudos