Forum Academy Marketplace Showcase Pricing Features

Google Maps: Centering map on everything other than what I want it to center on (SOLVED)

I simply want the map to center on the current geographic position. I have the markers set as a list of posts that are 0.2 miles from the current geographic position.

The issue is the map is not focusing on the current location, but focusing on random markers that are much further than 0.2 miles from the current geographic location. It seems as if I have the data right, but I may be using my “bubble logic” the wrong way.

Can anyone spot a flaw that may be causing the map to not center on the current location? Thanks in advance.

That should work with the box ticked for centre.

But it is a little flaky with geo position.

Okay, I was curious as if it was just flaky geo positioning. Thank you for your help.

What browser are you using ?

I get issues with Chrome, even thought it has GPS persmission, it hangs … and thus won’t centre.

FYI it seems Google no longer allow “Get Current Location” from non-SSL sites.

I a using Chrome, but I have been playing around with it a bit, and I find if you create a button that on click allows the map to center on the current geographic location, Google will indeed get the current location. Maybe this is like when a browser blocks a popup except for when the user clicks, the popup and map centering are user-warranted actions? Not sure, though, just a theory.

As long as you are a site, or have set up your own with SSL, you will be fine.

1 Like