Symbol size not affected by map zoom

15912
12
05-11-2015 09:24 AM
SimonFox
New Contributor II

Hi folks,

I have a server sending me symbols onto my map. They're quite small when zoomed out. When I zoom in on my AGSMapView, I can see the symbols increasing in size as I'd want them to.

However as soon as I left go of the zoom gesture, the symbols snap back to the tiny resolution. So the result is that regardless of the map scale, the symbols remain tiny.

We tried making their images very large on the server as a test, but it's the same. Seems to be a client-side issue.

Any ideas on what I could do?

Thanks guys, much appreciated.

Simon.

0 Kudos
12 Replies
SimonFox
New Contributor II

I tracked all the actual AGSPictureMarkerSymbols in my layer via the AGSRenderer object.

The image size is very small (6x6) (ish)

Also used a proxy server to see the image data. The images are small on arrival.

I can scale the symbols up by setting the size attribute of the symbols, but of course the images are too fuzzy.

I noticed that the feature layer rendering mode was "static" not dynamic. Not sure if that matters.

Is there something I should be doing when I call initWithURL for my feature layer perhaps? Some attribute that needs to be set?

Why would the server scale down the vector images so low?

0 Kudos
DiveshGoyal
Esri Regular Contributor

Simon,

What you're seeing is expected. The AGSPictureMarkerSymbol uses an image to render the symbol. The size of the symbol depends on the size of the image. So if the image is 6 pixels x 6 pixels, that's how big it'll be displayed on screen. Now, you can override the size property of the symbol to make it larger, but that would force the image to be scaled possibly making them fuzzy.

When you pinch to zoom in, the feature layer waits till the gesture is over to re-render its content, and in the meanwhile, it just re-scales the content on screen. It does this because you could potentially have a lot of features in your layer, and re-rendering it while the gesture is in progress would be very CPU intensive and might deteriorate the responsiveness of the map. Thus, the symbol might temporarily appear larger as it is re-scaled while the gesture is in progress. And yes, this behavior is specifically tied to the "static" mode.

The "dynamic" mode is more suitable to graphics layer (not feature layers) which typically have only a few graphics. In this mode, the content is drawn using the GPU (not CPU as with static mode). The GPU fares much better at re-rendering content on-the-fly while the gesture is in progress. So you would not see picture marker symbols temporarily appear fuzzy, they would always be their true size.

But in both the cases, the picture marker symbol is drawn based on the size of the image (unless overriden in code)

LasseReedtz
New Contributor

Did you ever find a solution ?

I'm trying to find a solution to the same problem, but for the windows desktop runtime sdk

- Lasse

0 Kudos