Support » Plugin: Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps) » Is it possible to show a map layer centered on a specific marker?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I spent the afternoon studying the plugin’s code.

    It might be easy to implement, I mean, the way I see it 🙂

    We need to add a new rule in case both LAYER and MARKER are mentioned into the short code.

    if (!empty($layer) and !empty($marker))

    In that particular case, it should return (show) the map using the LAYER’s specs and setting the setView() function to the MARKER’s $lon = $row['lon'] and $lat = $row['lat'].

    Sound easy to do. I’ll happily do it myself, unfortunately, my knowledge in coding is read only 🙂 I can read stuff, variables and functions and understand what they do but I can’t really code them on my own 🙁

    Plugin Author RobertHarm


    I still dont get the usease behind your idea – what are you trying to achieve?

    Focusing on a particular spot, while allowing people to see that there’s other locations with the same occupation or service.

    Plugin Author RobertHarm


    why not put all markers you want the user to see into a layer map?

    It’s a bit hard to explain 🙂

    Let’s say that you are reviewing restaurants in a particular city, London for example. You can organize types of restaurants and classes into MapsMaker layers.

    Reviews about each restaurant goes into a WordPress post (SEO oblige), with a map showing its location. It will let people see the reviewed restaurant and discover other spots at the same time (same type / standing / same layer), without having to go to a layer specific page to see everything.

    The centered marker will be the current restaurant reviewed, and the others will show up around it.

    Hope you get the idea 🙂

    I would be interested in that too!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is it possible to show a map layer centered on a specific marker?’ is closed to new replies.