POST
|
Thank you for the code, it helped reproduce things here. After speaking with a member of our 3D team, I found a solution to your problem. The LocationToScreen method takes an input MapPoint but its not aware of SurfacePlacement modes unlike Graphics in a Layer. The MapPoint will be treated as absolute. To work around this, you will need to retrieve the elevation value for the X,Y of the point and add it to the Z value of the graphic/geometry you want to input into the LocationToScreen method. sceneView.scene?.baseSurface?.elevation(for:, completion:) will retrieve the elevation, which you would then add to the Z value of your point. I realize you mentioned that method earlier, and that it is asynchronous, but hopefully it won't be too difficult to incorporate it into your code. Let me know if I can be of further assistance, Mark
... View more
07-21-2022
03:12 PM
|
0
|
0
|
518
|
POST
|
I've tried a few things out on my end, but to make sure I'm understanding things correctly, can you send me the coordinates and SR of the `AGSPoint` used to draw the graphic? Also, the `SceneView`s `currentViewpointCamera`? I can then replicate what you're seeing. For example: print("currentViewpointCamera: \(sceneView.currentViewpointCamera())") print("geometry = \(g.geometry)") Which gives this output: currentViewpointCamera: AGSCamera: heading: 330.00, pitch: 97.00, roll: 0.00, location: AGSPoint: (-4.459500, 48.388900, 80.000000, nan), sr: 4326 geometry = Optional(AGSPoint: (-4.460926, 48.390397, 71.284401, nan), sr: 4326) If you could also provide the elevation source you are using (if it's OK to share), that would be great. That way I can recreate the issue here and delve into it some more. Thank you for your patience! Mark
... View more
07-20-2022
02:55 PM
|
0
|
0
|
527
|
POST
|
Sorry, I think I misunderstood your initial question, which was to get a screen location. So, obviously, screenToBaseSurface won't work. What do you want to do with the screen point once you have it? The screen location of a particular map point/graphic/feature will change as the map is panned/zoomed. What kind of issues are you seeing with AGSSceneView.locationToScreen? A screen shot would be helpful, if possible. Thanks, Mark
... View more
07-18-2022
12:14 PM
|
0
|
0
|
539
|
POST
|
Thank you for your question! There are a couple of things you can try. - You can try using the - (AGSPoint *)screenToBaseSurface:(CGPoint)screenPoint; method instead. That method Converts the specified screen point to a location on the base surface i.e. ignoring any 3D features/graphics on or above the surface that may be intersecting the screen point. The location returned will have a z-value corresponding to the elevation at the intersecting surface. - Depending on if your features/graphics are in a layer or in a graphics overlay, look at the AGSSurfacePlacement and AGSLayerSceneProperties classes. AGSLayerSceneProperties has a AGSSurfacePlacement property, which specifies how data belonging to the layer should be placed in relation to the scene's surface. Both AGSGraphicsOverlay and AGSFeatureLayer have a AGSLayerSceneProperties property which you can use to specify how the data is placed. If that doesn't solve your issue, or if you have more questions, please reach out! Mark
... View more
07-18-2022
08:17 AM
|
0
|
0
|
548
|
POST
|
Hello! Thank you for your question. You are correct, the "AGSArcGISMapImageLayer" does not have an option to change the symbology, but the sublayers of that layer do have that option. They have a renderer property which allows you to set symbology that will be used to render that layer. You need to find the sublayer you want to change, create a renderer, and assign that renderer to the "renderer" property. let mapImageSublayer = mapImageLayer.mapImageSublayers[index] as! AGSArcGISMapImageSublayer let simpleRenderer = AGSSimpleRenderer(symbol: AGSSimpleMarkerSymbol(style: .cross, color: .red, size: 12)) mapImageSublayer.renderer = simpleRenderer You need to make sure your layers support dynamic layers ("Supports Dynamic Layers: true"). See this blog post for more information. If you have more questions, let us know! Mark
... View more
07-06-2022
02:18 PM
|
1
|
1
|
664
|
BLOG
|
This release includes: - FloorFilter - a new component which simplifies visualization of GIS data for a specific floor of a building in your application. See the documentation here. - The "basemap type" and "static basemap" initializers have been deprecated in the SDK at 100.14. They have been replaced by the "basemap style" initializers/methods. See this issue. - Fix new linter warnings resulting from "SwiftLint 0.47.1". - Replace the deprecated AGSLocationDataSource.stop() method with stopWithCompletion:. You can find the Toolkit here. See this blog post for information on the SDK release. We hope you enjoy the new release! Let us know what you're building with it.
... View more
04-27-2022
12:57 PM
|
0
|
0
|
307
|
POST
|
Excellent, I'm glad you found the issue! If you have any more questions, please let us know! Mark
... View more
04-06-2022
12:07 PM
|
0
|
0
|
737
|
POST
|
Ok, great, I'm glad you resolved the issue. If you have any other questions, please let us know. Mark
... View more
04-06-2022
09:37 AM
|
0
|
0
|
405
|
POST
|
Also, what version of the Runtime SDK for iOS are you using?
... View more
04-06-2022
09:20 AM
|
0
|
2
|
740
|
POST
|
Sorry to hear that didn't resolve your problem. Can you send some sample lat/long values that you are using as inputs when initializing the "AGSPoint" and also any specifics of the basemap in your map (Are you using an AGOL basemap? What's the basemap's Spatial Reference?). Thanks, Mark
... View more
04-06-2022
09:19 AM
|
0
|
0
|
740
|
POST
|
Hello! What kind of wrong values are you seeing with the screenPoint? Can you provide some sample values of the inputs to "locationToScreen" and the incorrect output values you are getting? Where are the input points coming from? Also, what version of the Runtime SDK are you using? Thank you, Mark
... View more
04-06-2022
09:17 AM
|
0
|
0
|
408
|
POST
|
Hello. You can certainly use an AGSUniqueValueRenderer to accomplish what you want in a more performance-sensitive way. Another way would be to optimize the "for" loop where you are creating the graphics. Specifically: - create the two images outside of the loop. They don't need to be created each time - the same for the Symbols. Create the two symbols once, outside the "for" loop, then just use the appropriate symbol when creating the graphic - use one of the other AGSPoint initializers, such as AGSPointMakeWGS84, to eliminate creating an intermediate object (this was covered in a separate question) Finally, is there any way you could apply some optimizations to the "refreshData()" method? You are removing all graphics and recreating them each time. Is it possible to only remove/recreate a sub-set of them? If only the geometries are changing, you could possible simply update the geometries for the graphics, instead of recreating everything? Graphics have a "visible" property that allows you to hide/show them. You can also set a new geometry or symbol on the graphic without recreating it. Mark
... View more
04-05-2022
09:58 AM
|
2
|
1
|
724
|
POST
|
Hello, thank you for your question! I suspect the problem lies with how you are creating the point geometry. You don't have to create an intermediate CLLocation, but instead you can create the point using your lat/long values directly. See the AGSPointMakeWGS84 method. The important thing is that the spatial reference of the coordinates you are using and the SpatialReference of the point created match. If they do, you shouldn't see the "movement" of your graphic in the overlay. Please let us know if that doesn't work for you. Good luck! Mark
... View more
04-05-2022
09:34 AM
|
1
|
1
|
748
|
POST
|
Hello! I think your analysis is correct when you mention the locationTrackingMode == .initial as the culprit. In this line in ArcGISARView.swift you can see that the location data source is stopped if the tracking mode is anything other than .continuous. If you are depending on the location data source continuously providing location updates, use the ARLocationTrackingMode.continuous mode. Let us know if that doesn't solve your problem or you have other questions. Best of luck! Mark
... View more
03-24-2022
01:33 PM
|
1
|
0
|
478
|
POST
|
The Runtime will project points in a different SR than the scene to the correct SR. If it's working with what you have, then all is good. The important thing is to always specify a SpatialReference when creating geometries.
... View more
03-24-2022
12:56 PM
|
0
|
0
|
544
|
Title | Kudos | Posted |
---|---|---|
1 | 05-31-2023 09:26 AM | |
1 | 04-19-2023 08:58 AM | |
1 | 04-07-2023 07:49 AM | |
1 | 03-29-2023 08:01 AM | |
1 | 03-13-2023 03:47 PM |
Online Status |
Offline
|
Date Last Visited |
04-24-2024
09:11 PM
|