WordPress.org

Support

Support » Plugins and Hacks » Simple Fields Map extension » [Resolved] How to use it

[Resolved] How to use it

Viewing 4 replies - 1 through 4 (of 4 total)
  • studioleland

    @studioleland

    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.

    Plugin Author Pär Thernström

    @eskapism

    @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!

    Plugin Author Pär Thernström

    @eskapism

    @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);

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How to use it’ is closed to new replies.
Skip to toolbar