WordPress.org

Ready to get started?Download WordPress

Forums

Simple Fields Map extension
[resolved] How to use it (5 posts)

  1. norboo
    Member
    Posted 1 year ago #

    Hi!
    I've been trying to figure out how to output the map.
    I can output a static map, but I want the draggable/ zoomable one.

    If you can write a few lines would be greatly appreciated.

    Thanks

    http://wordpress.org/extend/plugins/simple-fields-map-extension/

  2. studioleland
    Member
    Posted 1 year ago #

    Hello,

    How would I save the lat and lng back to the custom field key array since it's not just a string? I am geocoding the addresses from a front-end submission.

  3. Pär Thernström
    Member
    Plugin Author

    Posted 1 year ago #

    @norboo: the simple fields google map plugin focuses on letting a user select a location, and then it's up to a developer to do things with the saved information. you can easily get the lat and long coordinates that has been saved and then you can follow for example this getting started guide to add the map in any way you want:

    https://developers.google.com/maps/documentation/javascript/tutorial

    good luck!

  4. Pär Thernström
    Member
    Plugin Author

    Posted 1 year ago #

    @studioleland:

    There is a function called
    simple_fields_set_value that you can use to set the value.

    The internal value is an array with the lat and lng values as keys, so something like this should work:

    $value = array(
      "lat" => "58.43",
      "lng" => "14.414"
    );
    simple_fields_set_value(123, "myMapField", null, null, $value);
  5. flutch
    Member
    Posted 1 year ago #

    Hi,

    Thanks for this useful plugin.

    It works and I can load a map from repeated field, but I'm just wondering how to show a marker for my defined point(s).

    Can you tell me please ?

    Thank you !

    Alex

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.