function geocoder_openstreetmap_nominatim_field in Geocoder 7
Plugin callback.
1 string reference to 'geocoder_openstreetmap_nominatim_field'
- openstreetmap_nominatim.inc in plugins/
geocoder_handler/ openstreetmap_nominatim.inc
File
- plugins/
geocoder_handler/ openstreetmap_nominatim.inc, line 47
Code
function geocoder_openstreetmap_nominatim_field($field, $field_item) {
if ($field['type'] === 'text' || $field['type'] === 'text_long' || $field['type'] === 'text_with_summary' || $field['type'] === 'computed') {
return geocoder_openstreetmap_nominatim($field_item['value']);
}
if ($field['type'] === 'addressfield') {
$address = geocoder_widget_parse_addressfield($field_item);
return geocoder_openstreetmap_nominatim($address);
}
if ($field['type'] === 'location') {
$address = geocoder_widget_parse_locationfield($field_item);
return geocoder_openstreetmap_nominatim($address);
}
if ($field['type'] === 'taxonomy_term_reference') {
$term = taxonomy_term_load($field_item['tid']);
return geocoder_openstreetmap_nominatim($term->name);
}
}