Home Plugins simple fields map extension
Simple Fields Map extension logo

Simple Fields Map extension

by Pär Thernström on WordPress.org

Extension to Simple Fields that adds a field type for selecting a location on a Google Map.

(4)
The field with its options

The field with its options

Adds a new field type to Simple Fields that let you choose a location.

The coordinates (lat/lng) of that location is saved
and easily retrieved in for example your theme.

Happy geocoding!

Features

  • Easily add maps to any post, page or custom post type
  • Integrates seamlessly into Simple Fields
  • You can have multiple maps with separately settings
  • Each map can have it’s own:
    • zoom level
    • map type (Roadmap, Satellite, Hybrid, Terrain)
    • default location
  • Search location of address by using built in search box
  • Search location by enter its latitude and longitude coordinates
  • Supports Repeatable Fields – have any amount of maps connected to each post
  • From each saved position you can get
    • Latitude and Longitude
    • Address information, including store/shop name if that was what the user searched for when adding this location
    • Preferred zoom level

To add a map to a field group programmatically

Slug for this field extension is “googlemaps”.

Full example using register field group:

 'My map',
        'slug' => "mu_map"
        'repeatable' => 1,
        'fields' => array(
            array(
                "type" => "googlemaps",
                "slug" => "sf_map",
                "name" => "Test map",
                "options" => array(
                    "defaultZoomLevel" => 10,
                    "defaultMapTypeId" => "HYBRID", // ROADMAP | SATELLITE | HYBRID | TERRAIN
                    "defaultLocationLat" => 40.71435,
                    "defaultLocationLng" => -74.00597,
                    "defaultZoomLevel" => 10
                )
            )
        )
    )
);

?>

Translations/Languages

This plugin is available in the following languages:

  • English

Usage

  1. (Make sure you have Simple Fields installed)
  2. Install the Simple Fields Maps Extension plugin
  3. You will find the Map field in the usual settings page of Simple Fields
Active installations100+
Weekly downloads
14-12.50%
Version1.3.4
Last updated12/18/2013
WordPress version3.8
Tested up to3.7.41
Tags
geolocationGoogle Mapslatitudelongitudesimple fields