function _gmap_geo_from_wkt in GMap Addons 7
Same name and namespace in other branches
- 6 gmap_geo/gmap_geo.module \_gmap_geo_from_wkt()
Split WKT into an array.
1 call to _gmap_geo_from_wkt()
- theme_gmap_geo_formatter in gmap_geo/
gmap_geo.module - Themes a geo field as a gmap.
File
- gmap_geo/
gmap_geo.module, line 270 - Provides a Google maps location picker widget for Geo cck fields. Provides a field formatter for Geo fields that displays point, line, or polygon data on a Google map.
Code
function _gmap_geo_from_wkt($wkt) {
$geodata = preg_split('/ *\\(|,|\\)/', $wkt, -1, PREG_SPLIT_NO_EMPTY);
$geodata_type = array_shift($geodata);
return array(
'type' => $geodata_type,
'data' => $geodata,
);
}