WordPress.org

Ready to get started?Download WordPress

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
Is it possible to show a map layer centered on a specific marker? (7 posts)

  1. adamedoe
    Member
    Posted 1 year ago #

    In other words, how to make this shortcode work :)
    [mapsmarker marker="1" layer="1"]

    The idea is to focus in one marker while showing other markers from the same category (layout).

    http://wordpress.org/extend/plugins/leaflet-maps-marker/

  2. adamedoe
    Member
    Posted 1 year ago #

    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 :(

  3. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

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

  4. adamedoe
    Member
    Posted 1 year ago #

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

  5. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

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

  6. adamedoe
    Member
    Posted 1 year ago #

    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 :)

  7. photocoen
    Member
    Posted 1 year ago #

    I would be interested in that too!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.