-
Notifications
You must be signed in to change notification settings - Fork 49
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
Ability to render multiple maps with same options #62
Comments
Hi @roelandwyns Ok, I understand your use case and needs. But what would be the perfect solution for that? |
Using these properties would indeed help to solve this. But wouldn't there still be a problem needing to convert |
Maybe but I can't see any solution on |
Since xToLon, yToLat aren't exported in the default export, it might be easier for us to calculate the center ourselves. And render the first map with center + addBound (undocumented?) and let it calculate the zoom. |
|
Sure. |
Hi,
We have the following use case:
Staticmaps calculates the bounds for displaying the map based on the features on that map individually on the render. This means that if we have features that are outside of the boundaries of the background map, the centerX, centerY and zoom are recalculated and this does not work very well when overlaying the maps on each other. (Misaligned features on the background image).
What we do now as a fix for this is getting the { centerX, centerY, zoom } out of the background map, and using them in the render of the feature maps. (after re-converting x with xToLon and y using yToLat).
This works perfectly, however it is not the cleanest.
If needed, we can also look into creating a PR if you tell me your thoughts on this idea :) .
Kind regards,
Roeland
The text was updated successfully, but these errors were encountered: