keep Polyline symbol same size when zooming out

589
6
Jump to solution
10-20-2022 03:04 AM
EricJing
New Contributor III

Hi guys, 

Is it possible to keep a symbol of polyline same size(length) when zooming out.

We have a map which has many short polylines inside which are used to display doors. There are differrent colour symbols on the polylines to display different status. These information is very important to customers. So the customers request the polylines visible all the time, even if zooming out to a big scale. 

Is it possible?

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Reference scale will keep the same line width and get smaller and bigger with the zoom (without reference scale, lines usually keep their line width and only length changes), so I think this is the opposite of what you want. The line is there to represent a physical object from its starting point to its ending point, and as you zoom out those points will appear closer and closer. It sounds like what you're really looking for is the MarkerSymbol behavior, and you should consider highlighting the doors using a marker symbol instead. You might even be able to use both, so when you zoom in far, you use lines to represent the actual door, but when zooming out, using the scale range you switch to a marker symbol that represents the location of the door at the point where the line symbol becomes too small.

View solution in original post

6 Replies
GISGeekpro
New Contributor II

Hi Eric, 

You can do this for the whole Map by right-clicking on the map icon, and setting up a reference scale. 

Also, if layer completely disappears after zooming out, a Visibility Range has been set for the layer. To remove it, right-click the layer, go to general and remove / modify any visibility range filters set to the layer. 

Hope this helps, 

BR, 

M. 

EricJing
New Contributor III

Hi @GISGeekpro

Thanks for the reply. 

I am coding to research on this solution. I am trying to change the ReferenceScale when zooming out on MapView. Every time I changed the ReferenceScale, the size of door did change. But as @dotMorten_esri said, only the width changed, the length didn't change. 

I am wondering if this is the recommended way to use ReferenceScale. And I am confused how the referencescale is used in the calculation of polyline size. I haven't found a proper number or formula to set the ReferenceScale.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

As @GISGeekpro suggested, it sounds like Reference Scale is what you're looking for - in the ArcGIS Runtime API, this is accessed via: Property ReferenceScale (arcgis.com)Also see SDK sample Map reference scale | ArcGIS Runtime API for .NET | ArcGIS Developers.

EricJing
New Contributor III

Hi @MichaelBranscomb 

Thanks for the sample. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Reference scale will keep the same line width and get smaller and bigger with the zoom (without reference scale, lines usually keep their line width and only length changes), so I think this is the opposite of what you want. The line is there to represent a physical object from its starting point to its ending point, and as you zoom out those points will appear closer and closer. It sounds like what you're really looking for is the MarkerSymbol behavior, and you should consider highlighting the doors using a marker symbol instead. You might even be able to use both, so when you zoom in far, you use lines to represent the actual door, but when zooming out, using the scale range you switch to a marker symbol that represents the location of the door at the point where the line symbol becomes too small.

EricJing
New Contributor III

Hi @dotMorten_esri 

Thanks for your idea. I think your solution will be my final choice. At current stage, I am writing code to research ReferenceScale. 

0 Kudos