WordPress.org

Ready to get started?Download WordPress

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
[resolved] pushing markers from another db table (8 posts)

  1. shemesh
    Member
    Posted 1 year ago #

    hi,
    i'm using cf7 + cf7 map field (made by myself) + cf7 to db to let users enter their own location.
    this data is saved to a dedicated table in the database.
    i know how to pull the data from the database, you can see sample php code over here.
    now i have all the data i need at hand: marker name, longitude, latitude etc...

    how to i push it into my map?
    where do i hook up?

    tnx.

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

  2. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,
    the problem is, that cf7 map field plugin is not compatible with Leaflet Maps Marker. I tried to find a way that both plugins can be used together, but unfortunately, cf7 map field is overwritting my javascript and causing my maps to break.
    regards,
    Robert

  3. shemesh
    Member
    Posted 1 year ago #

    the collision between the plugins is for an other discussion...
    for the sake of my question, plz forget i've mentioned cf7-map-field.

    assume i have a table in my db holding: name, description, lat & long.
    where and how should i hook into maps-marker in order to add all those entries as markers on a map.

    ??

    tnx.

  4. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    currently there is no hook you can use - i plan support for GeoJson in one of the next versions. For now you have to import your markers into wp_leafletmapsmarker_markers-table

  5. shemesh
    Member
    Posted 1 year ago #

    ok than... 2 questions:

    1) in case i save all my markers in that table: how do i show them all at once on the same map?

    2) what about changing the plugin code? there must an end-point function where you query the table to pull the markers. can you point me to it?

  6. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    ad 1: create a new layer map, enable "Multi-layer-map"-option and select "show all markers"-checkbox.

    ad 2) from v2.9 on (release in 2-3 days) this is done in inc/showmap.php - but might be a bit difficult to change that, as markers are also fetched in /leaflet-fullscreen.php, /leaflet-kml.php and other files, depending on the needed output.
    regards,
    Robert

    PS: as I give support for free, I´d appreciate a short review at http://wordpress.org/support/view/plugin-reviews/leaflet-maps-marker

  7. shemesh
    Member
    Posted 1 year ago #

    i have succeeded pushing my marker to wp_leafletmapsmarker_markers table.
    works great!
    tnx.

  8. ananthambas
    Member
    Posted 10 months ago #

    @shemesh

    I'm exactly in the same place. I've been using your plugin and the CF7+db plugin. Now I wanna display markers from the db in the map.

    Can you pls tell me how you did that?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.