Git Product home page Git Product logo

Comments (4)

dhuangg avatar dhuangg commented on August 19, 2024

This can only be completed after #169

from nexus2.

dhuangg avatar dhuangg commented on August 19, 2024

copying @berosen 's notes here:

So from what I can tell, the problem is with the data. To begin with, the converted shapefiles -->geojsons are in EPSG 3857 (default coordinate system for leaflet). 3857 is a coordinate system that represents its coordinates in meters, if you take a look at the points that we are loading onto the map the, coordinates are in degrees. Obviously does not match 3857.

Leaflet might do some re-projecting on the fly to match the points and the basemap then take the crs from there. I'll have to look into how it handles projecting data. So most likely the reason it isn't appearing properly is that the 2 data sets are on different coordinate systems.

Here is what I can as the "action items"... I feel everything i said above was rabble rabble.
-Tell me source of the data for the array passed to MapView
-We determine the coordinate system of that data and have new geojsons match or vice versa.

I believe this should fix the problem, just a little bit of data cleaning. Seems easy but might end up being a pain.

Pre-note:
In the meantime I think it would be useful to unit-test your geojson loading process in a basic leaflet environment, you can just use that skeleton html that I sent over a couple weeks ago I think, that way we can see that A) the crs is actually the problem B) your loading implementation works.

Note:
I ran the geojson I was originally using to displace place names through a linter and it said it wasn't a valid geojson. Unsure of how everything was functioning before but non the less lets start with the easier/more obvious situation I outlined above haha

from nexus2.

dhuangg avatar dhuangg commented on August 19, 2024

Proposed solution: create a separate map component specifically for fieldtrip view to allow for different map data types to render.

from nexus2.

dhuangg avatar dhuangg commented on August 19, 2024

https://stackoverflow.com/questions/44155385/rendering-geojson-with-react-leaflet

from nexus2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.