Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add a sync version of setGeoJson function in GeoJsonSource #16482

Open
mirrajabi opened this issue May 25, 2020 · 0 comments
Open

Add a sync version of setGeoJson function in GeoJsonSource #16482

mirrajabi opened this issue May 25, 2020 · 0 comments
Labels
archived Archived because of inactivity

Comments

@mirrajabi
Copy link

Platform: Android

Mapbox SDK version: v8.5.0-beta.1

Request

A sync version of setGeoJson function in GeoJsonSource.

Request details

Hi there,

MR #15871 introduces an improvement which for us turned out to be a huge problem.
We've made some apps that update the GeoJsonSources multiple times per second in some specific scenarios. (specific scenario being: replaying feature movements in the past few minutes with increased speed)
In these apps, It's important, not to lose any "updates", but fps drop is not a problem.
Before this release, our "replay" feature was working fine. It could render all the updates that were being fed to it. but now, we don't have a way to get notified when the source is updated (and even having that wouldn't be ideal). so the result is that we call setGeoJson on GeoJsonSources very fast and it won't render all of the updates.

Current solutions are to either keep the SDK version always below v8.5.0-beta.1 which is not going to work. Or, drop parts of the functionality which also isn't great! :)

Steps to trigger behavior

[Android instructions]

  1. Make a GeoJsonSource and a Symbol layer
  2. Use any sort of delay mechanism and feed about 50 features to the source with a ratio of just more than 3 times per second (or try something faster, like 10, if you have a very high-end device :D)
  3. Run it!

Expected behavior

All the sources updates should be rendered. (I know this might defeat the purpose of #15871, but having the option is helpful)

Actual behavior

Map draws the sources in random times depending on how heavy the feature collection passed to setGeoJson function is.

Thanks in advance!

@stale stale bot added the archived Archived because of inactivity label Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity
Projects
None yet
Development

No branches or pull requests

1 participant