Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom in to geojson #27

Closed
robmarshall opened this issue Dec 15, 2021 · 3 comments
Closed

Zoom in to geojson #27

robmarshall opened this issue Dec 15, 2021 · 3 comments

Comments

@robmarshall
Copy link

Hi,

I have a small route around a town that I am trying to convert to an SVG. How would I expand this to fix the viewport. It is currently a tiny spec.

Thanks,
Rob

@gagan-bansal
Copy link
Owner

gagan-bansal commented Dec 18, 2021

Hi,
You can use any svg pan zoom tools like panzoom.

Please check pan zoom example examples/world-pan-zoom.html

Please explain your query in details if the above solution does not satisfy you.

Gagan

@gagan-bansal
Copy link
Owner

@robmarshall Hope your query is resolved. Right now closing the ticket.
If required please re-open it.

@gagan-bansal
Copy link
Owner

I think this case is where data pertains to small geographic area say 5km x 5km. geojson2svg's default map extents are of whole world. So for such scenarios the data would be a very tiny point in the map.

So while initiating the geojson2svg, you need to give mapExtent as your data bounding box coordinates. You can use geojson-bbox to find the extent of your data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants