Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Member Google Map position off
judgej
✭
I am having a problem with the MemberMap extension. When going into the "Manage Map Location" screen, the pin in in the wrong place indicating the current location.
There seems to be a pattern - the map in this screen is large than the map in the user profile overview. Its top-left coordinates are in the same lat/long position and its pin is in the dead centre of the displayed map. However, since the map extends further down and to the right (as it is bigger) the pin is offset down and to the right from where it should be.
Looking at the page source, I cannot see anything wrong. All the pins and maps are handled by the Google library, so I really cannot see what could be wrong.
I've seem similar issues with some embedded maps, where the postcode centres can be up to five miles off, while the main Google site centres them correctly.
Anyone any idea what the problem could be?
-- Jason
Edit: the "View All Members" map does show correctly. I am also using a custom zoom level and lat/long coordinate for the map, to show the whole of the UK by default.
Now I come to write that, I realise it is the zoom level that is incorrect in the admin screen. The map is zoomed out by one point, and seemingly *before* the pin is stuck in the middle.
Here is the map http://www.consil.co.uk/downloads/forum-google-map-location-error.gif. If the map were zoomed by 200% (double the size) with the top-left corner at the same location, then the pin would be spot-on in the North East of England.
Also strangely, if I zoom in on the map, it zooms towards the point where the pin *should* have been, rather than the displayed centre of the map, so some part of the map knows where it is supposed to be centred, but the actual display does not.
This is consistent acrss browser types.
There seems to be a pattern - the map in this screen is large than the map in the user profile overview. Its top-left coordinates are in the same lat/long position and its pin is in the dead centre of the displayed map. However, since the map extends further down and to the right (as it is bigger) the pin is offset down and to the right from where it should be.
Looking at the page source, I cannot see anything wrong. All the pins and maps are handled by the Google library, so I really cannot see what could be wrong.
I've seem similar issues with some embedded maps, where the postcode centres can be up to five miles off, while the main Google site centres them correctly.
Anyone any idea what the problem could be?
-- Jason
Edit: the "View All Members" map does show correctly. I am also using a custom zoom level and lat/long coordinate for the map, to show the whole of the UK by default.
Now I come to write that, I realise it is the zoom level that is incorrect in the admin screen. The map is zoomed out by one point, and seemingly *before* the pin is stuck in the middle.
Here is the map http://www.consil.co.uk/downloads/forum-google-map-location-error.gif. If the map were zoomed by 200% (double the size) with the top-left corner at the same location, then the pin would be spot-on in the North East of England.
Also strangely, if I zoom in on the map, it zooms towards the point where the pin *should* have been, rather than the displayed centre of the map, so some part of the map knows where it is supposed to be centred, but the actual display does not.
This is consistent acrss browser types.
0
This discussion has been closed.
Comments
There is some duff logic in the extension. Line 268 of default.php starts like this:
if (lat != 0 && lng != 0) {
// Attempt to do geocode
}
In other words, if you *have* set a centre coordinate for your location, then this screen will ignore it and push the pin into where it thinks you are located.
Swap the logic over and it works fine:
if (lat == 0 && lng == 0) {
// Attempt to do geocode
}
That way if you have chosen to not display your location, then when you go into the management screen for your map, it will make a best guess as to where you are, otherwise it will push the pin in the map where you say you are.
Now, how do I raise a bug on an extension?
-- Jason