• Hello,

    I have written a function that created a shortcode for creating a map with 56 markers on it. The shortcode looks like this:

    [leaflet-map address=”MyCity” zoom=13] [leaflet-marker address=”Firstname Surname, MyStreet 17, 12345 MyCity, DE”]Firstname Surname
    , MyStreet 17, 12345 MyCity[/leaflet-marker] [leaflet-marker address=”AnotherFirstname AnotherSurname, AnotherStreet 18, 12345 AnotherCity, DE”] AnotherFirstname AnotherSurname, AnotherStreet 18, 12345 AnotherCity[/leaflet-marker] … etc. It is written in a string, and later I say echo do_shortcode($str);

    All the addresses are pulled out of the database, and they are correct. I use the Google Geocoder (set in the Plugin Settings).

    There are 57 JavaScript inserts, 1 for the map itself and 56 for the addresses.

    The problem is that some markers just do not appear and some appear at the wrong place, and I have no Idea why this is so.

    When I copy the address and search for it on Google Maps it shows the right location. Just not on my map.

    Why does this happen?

    Thanks!

    • This topic was modified 6 years, 7 months ago by Gerdski.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bozdoz

    (@bozdoz)

    unfortunately the google geocoder needs some work since Google has recently made api keys mandatory. I will have to add this optional functionality to the plugin. In the meantime, could you try setting your geocoder to osm nominatum?

    Thread Starter Gerdski

    (@gerdski)

    I tried the 2 other geocoders already…they give me terrible results. Nominatum gives me just 1 marker, 3oo kms away. Is there a special way how to prepare addresses to Nominatum?

    Plugin Author bozdoz

    (@bozdoz)

    Sorry I missed this question: I don’t believe there is a special way to prepare addresses for nominatum. I will look into re-adding google geocoder at some point.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Markers are wrong…why?’ is closed to new replies.