-
Notifications
You must be signed in to change notification settings - Fork 855
Option to position and size components with two corners. #580
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
Option to position and size components with two corners. #580
Conversation
This lets you lock a component to a specific bounding rectangle, which allows for precise tiling during zoom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work man, let me test it and I will merge it!
src/google_map_markers.js
Outdated
if ( | ||
child.props.seLatLng !== undefined || | ||
( | ||
child.props.seLat !== undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtogstad Could you explain briefly what are you doing here and why? Maybe leave a comment
@stephenfarrar What do you think about this? Given its part of the code you've been working with. |
Looks good to me. |
Just pushed an explanation, and thanks for looking at this pull request so fast! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@mtogstad Thank you very much for this! Please update to |
@mtogstad Hey, I know that this issue is closed, but I'm curious, how did this help with the canvas markers? I am using it for a similar use case & facing the exact same problem. Could you share the relevant change you made in this repo, https://github.com/istarkov/google-map-thousands-markers, which fixed the issue? |
@palashkaria Which version are you using? We're currently at |
I'm on 1.0.5 itself, but the issue is not with this lib, it's with the canvas implementation (https://github.com/istarkov/google-map-thousands-markers). What I understood from this change is that I have to pass |
@palashkaria Oh yes, what changed is that you can pass either
or
|
I think it's like palashkaria/google-map-thousands-markers@500dacf#diff-4848da3e28fb800ab253319bb2777f2e |
@palashkaria That should work given @mtogstad's change, but there might be a chance that you dont need that I think the best person to answer would be @mtogstad, as he did the change and tested it locally. |
@itsmichaeldiego here's an updated codesandbox version of istarkov's example, which also has the same issue. You can check it out here: https://codesandbox.io/s/kx7lo2plq5 This also has the |
@palashkaria I'm facing the same problem. Did you get a solution? |
@punnone [I work with @palashkaria] No. We are still trying to figure it out. |
Fixed it. 2 things have to be done.
Updated the codesandbox for reference: https://codesandbox.io/s/6v5vx7z65w |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This lets you lock a component to a specific bounding rectangle, which allows for precise tiling during zoom with the experimental google maps API.
I work on a project that uses a technique similar to the thousands-of-markers sample project linked to from the readme. If you run that project against the 3.32 google maps API you can see the same issue I was having. The tiles are not scaled when frames are drawn during a zoom, which causes the edges to either have gaps between them, or to overlap. This adds the option to specify a second LatLng (the southeast corner) to give a component a bounds-locked box to render into.
Here is a before example:

And after:
