Plugin Author
bozdoz
(@bozdoz)
What do you get in the admin shortcode helper page? Various maps or all Halifax?
Various. Calgary, Toronto, Sydney, Paris…
I tried embedding the Halifax one first, because it’s the example that uses an address.
Plugin Author
bozdoz
(@bozdoz)
I’m really not sure what could be happening then. If you see various maps in the shortcode helper page, then the shortcodes should be working properly.
Now that I’m looking a little more closely, the “Ontario” example on the helper page actually is showing Halifax, Nova Scotia! Here’s a screen cap…
Ontario is the only example on the helper page that tries to use an address instead of latitude/longitude.
-
This reply was modified 7 years, 12 months ago by
tommcgee.
Plugin Author
bozdoz
(@bozdoz)
Interesting. I would suggest changing your geocoder to Nominatum instead of Google. I will have to issue a new version to fix the use of Google’s geocoder before June 11th anyway. Perhaps your issue is related. Btw, you mentioned in your first post that lat/lng didn’t work for you (the third example). Does lat/lng work for you? is it just an “address” issue (related to Google geocoder)?
Actually lat/long does work. Using an address does not.
I’m already using Nominatum — I’m trying to move off of Google Maps altogether if I can.
Plugin Author
bozdoz
(@bozdoz)
Perhaps the Nominatum geocoding service has changed. I’ll look into it! Thanks for the heads up!
Plugin Author
bozdoz
(@bozdoz)
Should be fixed in 2.11.3!
Much better, though the maps’ centers are still approximations. Depending on the level of zoom, the city of Barcelona, for example, might be centered in the Mediterranean Sea. Zoom level 15 is fairly good, but anything lower drifts away from the actual location pretty quickly.
Also, adding an address (“Las Ramblas, Barcelona, Spain” or “Brook Park, Ohio, USA”) might give you a map in another continent.
But maybe this is a problem with Nominatum.
Plugin Author
bozdoz
(@bozdoz)
I’ll have to look into that. I have not noticed any issues with nominatum so far. What shortcodes are you using?
[leaflet-map address=”Barcelona”]
[leaflet-map address=”Las Ramblas, Barcelona, Spain”]
[leaflet-map address=”Brook Park, Ohio, USA”]
I’m using those, but with the zoomlevel set (anywhere from 5 to 20) and the scrollwheel enabled (which is how I first noticed that they were off-center).
[leaflet-map zoom=20 address=”Brook Park, Ohio, USA” scrollwheel=1]
Puts me near Brook Lane in the town of Brook, Isle of Wight.
[leaflet-map zoom=15 address=”Barcelona, Spain” scrollwheel=1]
Works well enough, but
[leaflet-map zoom=5 address=”Oslo, Norway” scrollwheel=1]
Is centered well to the south/southeast of Oslo.
Plugin Author
bozdoz
(@bozdoz)
could you check your CSS? Maybe your map images are being skewed with margin/padding settings. I just spun up a fresh site using your shortcodes, and they do not appear to be inaccurate. Also, in the map settings page, try clearing your geocode cache (just to be sure).