GithubHelp home page GithubHelp logo

Comments (6)

Melonman0 avatar Melonman0 commented on September 1, 2024

Thanks for the info! I'll try that right away!

from interactivemap.

Melonman0 avatar Melonman0 commented on September 1, 2024

I simplified the world_map.json and removed all the unneeded features. The file is now down to 1/4 of it's original size. I didn't want to simplify it more because some countries start losing their shape too much (i.e. Italy losing it's unique boot-shape)

Unfortunately I couldn't figure out how to get the Web Mercator projection working. It seems that when I use the "-proj merc" args, the coordinate system completely changes. I'll have to figure out how to get that working, so I'll close this and make a new issue for that.

Thanks again for the feedback @AskAlice!

from interactivemap.

AskAlice avatar AskAlice commented on September 1, 2024

@Melonman0 with -proj merc, i just divided the coordinates by something like 1000000

from interactivemap.

Melonman0 avatar Melonman0 commented on September 1, 2024

@AskAlice I actually figured it out how to make a map without using crazy coordinates in the millions.

In mapshaper, I just used this command line:
-proj +proj=merc +a=55 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs

The +a parameter seems to constrain the x-coordinates of the map so they are not in the millions any more. You can also add a +b to constrain they y-coordinates, but leaving it out seems to let mapshaper keep the correct aspect ratio. I'm not too sure what the other parameters do, but it seems to have worked for me lol.

from interactivemap.

AskAlice avatar AskAlice commented on September 1, 2024

ah neat! nice job

from interactivemap.

AskAlice avatar AskAlice commented on September 1, 2024

this could very well be a helper tool, if you implemented this code similarly to https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/SVGLoader.js, it could easily be used with things like https://github.com/react-spring/react-three-fiber/. However, I think this would be far less complicated compared to the SVGLoader since there aren't as many types of paths. Just shapes and lines.

From there it could be extended from a THREE primitive that could implement the loader such as is suggested here mrdoob/three.js#13478

from interactivemap.

Related Issues (4)

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.