You are here

function geocoder_service_get_content_type in Geocoder 7

Get Content-Type for an output format.

Given an output format, this helper function passes a compatible HTTP content-type to be placed in the header.

1 call to geocoder_service_get_content_type()
geocoder_service_callback in ./geocoder.module
Page callback for AJAX / Geocoder service.

File

./geocoder.module, line 300

Code

function geocoder_service_get_content_type($format) {
  $types = array(
    'json' => 'application/json',
    'kml' => 'application/xml',
    'georss' => 'application/xml',
    'gpx' => 'application/xml',
    'wkt' => 'text/plain',
    'wkb' => 'text/plain',
    'google_geocode' => 'text/plain',
  );
  return $types[$format];
}