Forums

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

  1. shemesh
    Member
    Posted 6 months 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 6 months 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 6 months 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 6 months 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 6 months 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 6 months 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 6 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.