Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author bozdoz

    (@bozdoz)

    Take a look at the global WPLeafletMapPlugin javascript variable, access the markers, and add a ‘dragend’ event to it:

    WPLeafletMapPlugin.markers[0].on('dragend', function (e) {
      console.log(e.target._latlng);
    });

    Would give you an updated object with lat and lng as keys.

    i need something close to this. I need to let a user add a marker and to save its coordinates to a file.

    Plugin Author bozdoz

    (@bozdoz)

    I’m not too familiar with this kind of user interaction on WordPress. As far as the plugin is concerned, you can access the latlng with the code above, but I can’t recommend anything further in terms of:

    * saving dialogues
    * permission for saving data
    * server script for saving
    * storage (though I would think built-in database is better than a file)

    wow … réponse ultra-rapide…. cimer

    (For the non french-readers, this means “wow extremly fast answer. Thx”).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Transfer Dragged Lat and Long to Form fields’ is closed to new replies.