AGSPictureMarkerSymbol Getting bigger when zooming

606
4
08-22-2022 02:14 AM
YoussefMAHERZI
New Contributor III

Hello,

The picture of AGSPictureMarkerSymbol is getting very big if we zoom in in these conditions :

 

sceneView.scene?.baseSurface?.elevationSources.append(AGSArcGISTiledElevationSource(url: URL(string: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")!))

sceneView.scene?.baseSurface?.isEnabled = true

graphicsOverlay.sceneProperties?.surfacePlacement = .drapedFlat

 

If I change any of these values, the zoom is fixed.


You'll find attached below a sample project with the problem.

 

Thank you,

0 Kudos
4 Replies
KoushikHajra
Esri Contributor

Hello @YoussefMAHERZI,

Thank you for reaching out to us with your question. 

This is the expected behavior with this surface placement enumeration (drapedFlat). DrapedFlat mimics the now deprecated draped enumeration, which was only possible when the rendering mode of the graphics overlay is set to be static. You will see the same behavior as draped in static rendering mode in the case of drapedFlat in dynamic rendering mode. 

By default points are always rendered in dynamic rendering mode. So, even if you change your enum value to draped, it would have actually been drapedBillboarded since you never changed the rendering mode explicitly. 

I have explained this in a blog post, which might clarify things a bit.   

If you must use the drapedFlat, then you could try using the distance composite scene symbol and see if it helps with the visualization a bit more. It displays a different symbol based on the camera distance. So, you could use different sized symbols in your case. Just a suggestion. Hope it all makes sense and helps as well. 

Please feel free to reach out if you have further questions.

 

YoussefMAHERZI
New Contributor III

Hi @KoushikHajra,

Thank you for your response. But what I still don't understand is that drapedFlat works correctly in dynamic rendering when the scene is zoomed out but starts to act like static rendering when the scene is very zoomed.

0 Kudos
KoushikHajra
Esri Contributor

Yes, it does start to get bigger as you're very zoomed in. At that point, you're probably at the max lod of your data. We don't intend to do any more processing after that point. 

So, my questions to you are:

1. Is this causing a blockage for you in your workflow? If so, please let us know.

2. What basemap are you using when you see this behavior? That'd tell us what level it starts get bigger.

Thanks,

Koushik  

0 Kudos
MelodyPotron
New Contributor

Hello,

I'm working with youssef. 

 

And we are now using AGSPictureMarkerSymbol in AGSScene with baseSurface enabled, and some overlay in drapedFlat.

 

        sceneView.scene?.baseSurface?.isEnabled = true
        sceneView.isAttributionTextVisible = false
        
        let centerParis = AGSPoint(x: 2.3588795, y: 48.8824283, z: 0.0, spatialReference: .wgs84())
        let centerLapaz = AGSPoint(x:-68.1193, y: -16.4897, z: 0.0, spatialReference: .wgs84())
        
        
        let graphicsOverlay = AGSGraphicsOverlay()
        graphicsOverlay.sceneProperties?.surfacePlacement = .drapedFlat
        sceneView.graphicsOverlays.add(graphicsOverlay)
        
        let image = UIImage(named: "mapDrone")!
        let symbol = AGSPictureMarkerSymbol(image: image)
        
        let graphic = AGSGraphic(geometry: centerLapaz, symbol: symbol, attributes: nil)
        graphicsOverlay.graphics.add(graphic)

 

 

We do have a blockage for this when there is a big elevation. The symbol for the same distance from the camera is way bigger and with big elevation takes all the place. (I'm testing on version 100.15 & ios 16.1.1) 

Here are the screenshot done

Lapaz (where the icon is big)

and Paris (where the icon is normal)

I extract the code on a stand alone application that has only a scene with base surface enabled, with one overlay in draped flat

Paris is around 51 meters in altitude and lapaz around 3700 meters.

The bigger elevation, the bigger deformation.

 

Also I'm giving you the application used for the tests

regards

 

 

 

 

0 Kudos