synw / geojson

Utilities to work with geojson data in Dart
MIT License
36 stars 53 forks source link

parsing geojson doesn't appear to work in web. #23

Open ATeal opened 4 years ago

ATeal commented 4 years ago

Whenever you call this on the web, while the code runs the features added to the sink don't appear to trigger the the listen.

I added a simple sample project for an example: https://github.com/ATeal/web_geojson

Additionally if you do a little hacking on the example project from the map_controller package and enable their implementation of the geojson read on web (they actually have it disabled on web, I'm assuming because it's not functioning) then you can see it not working there as well: https://github.com/synw/map_controller/tree/master/example

Feel free to let me know if I'm doing something wrong, or if I can help in anyway!

korva commented 4 years ago

I noticed this too: running featuresFromGeoJsonMainThread(), which is required for web, produces an empty FeatureCollection on web and Android. Running featuresFromGeoJson() on the same geojson string data on Android works correctly.