question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong Calculation on Zoom Out

See original GitHub issue

Hi!

I liked very much this plugins. Congratulations and thanks!

I really want to use this in my application, but I have a problem.

When I decrease the zoom, the positions of my Markers are wrong:

Initial position: screen shot 2016-06-10 at 11 46 49 am

Position on zoom out (my mark goes to ocean): screen shot 2016-06-10 at 11 54 02 am

My component code:

<GoogleMap
  bootstrapURLKeys={{ key: 'XXX' }}
  defaultCenter={myPosition}
  center={myPosition}
  defaultZoom={15}>
      <UserPin {...myPosition} />
 </GoogleMap>

I forgot some configuration or it’s a bug? Someone can help me?

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:20 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
GingerBearcommented, Aug 15, 2017

for anyone who has the same issue, the problem is that the custom marker is anchored at top left of the marker, but we actually want for marker to anchor is usually at center bottom. The fix would be adding a negative marginTop and marginLeft to adjust the anchor.

8reactions
itsmichaeldiegocommented, May 17, 2018

@Suresh-R-S You just need to use transform: translate(-50%, -50%) and that will do

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zoom in on a point (using scale and translate)
I used this for zooming my canvas and it works great! The only thing i have to add is, that the calculation of...
Read more >
Meeting minutes shown in the Zoom Dashboard needs ...
The total meeting minutes that you calculated will be multiplied by number of participants which is incorrect. Zoom shouldn't multiply the ...
Read more >
Zoom In, Zoom Out, and ZBox Commands on the TI-84 Plus
If you've already graphed a function on your TI-84 Plus calculator, you can use the Zoom In, Zoom Out, and ZBox commands to...
Read more >
React-Leaflet: Marker has wrong position after zoom out
There is nothing wrong with the marker positioning, it just depends on the way marker icon is defined. Since you defined marker icon...
Read more >
zoom - CSS: Cascading Style Sheets - MDN Web Docs
Zoom factor. 100% is equivalent to normal . Values larger than 100% zoom in. Values smaller than 100% zoom out ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found