Hello, could I have some clarity on the difference between adding/editing/removing an InMemoryFeatureLayer’s feature via its InternalFeatures vs using its FeatureSource’s transaction methods?
I’m seeing some discrepancies between the two when projections are involved. All the data that I have entering the map (as well as any I want to export) will always have features’ vertices in Decimal Degrees. The two projections I use are WGS84 (4326) and Web Mercator (3857).
If I recall, a few years ago I read on here that using InternalFeatures is faster. But if the map is in mercator and I update a feature in the InternalFeatures using a decimal degree value, it does not work obviously because all the values are being projected in 3857. So there are a lot of checks for which projection the map is currently in and reprojecting features when they are added/updated which is cumbersome.
A typical use case is rapidly updating a feature’s position and/or adding/removing vertices from lines/polygons.
Another use case is drawing a feature using the TrackShapeLayer. If the map is in mercator when I draw a feature, and then I want to edit its vertices, I have to check what projection the map is in first, and if its in mercator I have to project the shape to WGS84 first before displaying the vertices. Is this the correct way of doing it?
Thanks!