Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Have a look here: https://www.drupal.org/node/2330965
We're down as UK, but the map marker is somewhere in Norway.
Other listings have the same issue, EG: https://www.drupal.org/marketplace/code-enigma
Comment | File | Size | Author |
---|---|---|---|
#8 | map-position-marketplace-2335419-8.patch | 740 bytes | dagmar |
#7 | Screenshot_2015-10-02_13-08-56.png | 63.32 KB | mrf |
Comments
Comment #1
drummComment #2
dddave CreditAttribution: dddave commentedAdding related issues. I reported it way back in #2184321: World map shows company locations way off but remember similar issues before that. I disagree with the minor qualification because it makes "us" look like amateurs (as I explained in my issue).
Comment #3
drummThere are a couple things that could be wrong.
Comment #4
tvn CreditAttribution: tvn commentedSo the map marker doesn't show the company location. Whatever you enter in "Headquarters" text field won't be shown on the map. Markers show locations of company employees, and only those who agreed to share their location in their user profile. Torchbox has employees in Moldova and other places. Can it be possible that someone was actually located in that place and that's what got saved?
Comment #5
fenstratI can confirm the issue. The marketplace map seems to semi consistently place each organisational user several px too far East and North of their actual location.
As @drumm points out the likely culprit is the lat/long conversion to pixels or the css. For the conversion: http://cgit.drupalcode.org/drupalorg/tree/drupalorg/js/general.js#n17 which then call's geolocation's latitudeToPx()/longitudeToPx() http://cgit.drupalcode.org/geolocation/tree/modules/geolocation_html5/ge... - At a glance are those hardcoded parameters for leftLongitude and topLatitude, bottomLatitude could be off - not sure where they actually come from?
I'd have to agree with @dddave, this does make "us" look like amateurs, upping to Normal priority.
Comment #6
mgiffordIt's off in Canada too https://www.drupal.org/marketplace/openconcept - we're properly listed as Ottawa, Canada in the Headquarters section.
Canada's a pretty big place, but it looks like Ottawa is real close to James Bay. I don't know how many hundreds of km this is off. Certainly in Europe the dot would be in another country.
I think this issue has come up before this though.
Comment #7
mrf CreditAttribution: mrf at Chapter Three commentedConfirming that this is still an issue, and there seems to be a consistent northeast misplacement of all the markers.
Our map is showing San Francisco in the middle of Eastern Oregon and London on the Norway / Sweden border. The vast majority of our employees are in SF and have relatively up to date profiles, so I don't think this is a data issue.
Comment #8
dagmarI've been playing a bit with this code running directly from the browser console:
At the company where I currently work we have developers at Mexico, Colombia and Argentina, which allowed me to found a quite accurate set of values that place the points quite near of where they should be placed.
Of course the use of 20px for the dots makes this less accurate than use for example a 14px dot, but in my opinion 14px is too small for this map.
You can try this by adding this style using the browser inspector.
You could just try to paste the code posted above for a different company like lullabot and see if that is enough precise.
Comment #9
fenstratNicely done @dagmar. I've tested with our organisation and several others and it's a big improvement. Where those hard coded values come in still seems a mystery, however these adjustments work, so marking as RTBC.
As for the font size, I agreed 20px is not great for accuracy however anything smaller and the dot seems to get lost.
Comment #10
drummI committed this to the module's dev branch, this will likely be deployed to Drupal.org later today or tomorrow.
These hard-coded values are the latitudes and longitudes of the map image's boundaries. We got the image without knowing those, and had estimated the boundaries visually.
Comment #12
drummThis has been deployed. Since this is JS code, it may be cached for a few minutes longer by advagg, and longer if you are not logged in.
Comment #13
fenstratGreat, thanks @drumm. I'm seeing the changes.