Leaflet / OpenStreetMaps with incorrect location

Home Forums MapPress Support Leaflet / OpenStreetMaps with incorrect location

This topic contains 3 replies, has 2 voices, and was last updated by  Chris 4 days, 19 hours ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #18300


    I am having an issue with map pins being placed incorrectly. Same town, but varying distances away from the actual location. And, ironically, if I place the exact same address into the OpenStreetMaps website, that is showing in the correct spot. So it doesn’t seem to be OpenStreetMaps, but something down the chain in Leaflet, MapPress or one of the other technologies.

    For instance:

    383 Woodbury Ave, Portsmouth, NH 03801

    My Map (dynamically generated using PHP):


    Other times the map is in the middle of the ocean. Sometimes this fixes itself on a refresh, sometimes not.




    MapPress doesn’t do any geocoding itself – it uses either Algolia Places or Google geocoders, based on which ‘engine’ you select in the settings.

    Algolia is only accurate to the street level – not to individual street numbers.  I think that’s why the marker is in the wrong place for 383 Woodbury Ave.

    For the next version of MapPress I’ll add the MapBox and OSM geocoders, which seem to be more accurate than Algolia.  I’ll also include a MapPress setting to allow you select which geocoder to use.

    If you use the contact form to email me, I’ll send you a preview version to test as soon as it’s ready – later this week.

    Until then, you could also switch to Google instead of Leaflet in the MapPress settings.  Google has the best geocoder, but it requires an API key and has usage limits.




    Thank you so much for the helpful response. The Google Maps API charges are daunting as we have a high traffic site. I didn’t know that Agolia lacked the same specificity. Do you think it would help if I pass the business name in before the street address? I’ll probably test it just to see.

    Is OSM also a free geocoder? I would love to test that. I’ll send you a message.



    It’s worth a try adding the business name.  OSM is also free (their geocoder is called ‘Nominatim’).  I think Algolia was built on an OSM data extract several years ago, maybe it hasn’t been updated?

    MapBox also worked for me when I tried the sample address.  There are other geocoders that are paid but have generous free usage limits.  I haven’t tried them myself, but here’s a couple if you want to have a look:





Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.