-
Notifications
You must be signed in to change notification settings - Fork 1.3k
mbgl::style::GeoJSONSource should have GeoJSON getter #7376
Comments
This would increase memory consumption, probably unreasonably so in some cases that the core API needs to support, such as embedded or otherwise memory constrained devices. I've filed the inverse behavior as a bug in GL JS, and I would similarly argue that the native SDKs should choose the memory efficient route, and leave it up to the developer to keep the input data around in the case that they need it and are willing to accept the memory usage. But if this is a critical feature for iOS, and you are sure that the convenience of having the is worth the increased memory consumption in all cases, then you could implement it at the SDK level. |
It is already implemented at the SDK level, but that inevitably leads to #7375. The only way I can imagine getting around both problems is for MGLStyle to have a canonical, one-to-one mapping of MGLSource objects to |
I wanted to do this in #7377 to address #7375, but I held off because |
Peanut gallery here: I still think that if you had |
True, that’s one of the nice things about the annotation API: you can add and remove without having to regenerate the whole layer (as far as I can tell); see #6177. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
Still needed as a prerequisite for #6181. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
mbgl::style::GeoJSONSource
should have agetGeoJSON()
method, which would be required for fixing #7375. Currently,setGeoJSON()
tiles up the passed-inGeoJSON
object, but it doesn’t hang onto that object, nor does there appear to be a way to losslessly convert aGeoJSONTile
back into the originalGeoJSON
. If it wouldn’t increase memory consumption unreasonably, perhapsGeoJSONSource
would hang onto theGeoJSON
object alongside the tiled data./cc @jfirebaugh @ivovandongen
The text was updated successfully, but these errors were encountered: