We'll create fresh WordPress site with Simple Fields Map extension installed. You have 20 minutes to test the plugin after that site we'll be deleted.
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!
Slug for this field extension is “googlemaps”.
Full example using register field group:
<?php
// Add a field group with a Google Map-field
simple_fields_register_field_group('sf_map_test_field_fg',
array(
'name' => '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
)
)
)
)
);
?>
This plugin is available in the following languages: