You are here

function _geolocation_html5_lng2px in Geolocation Field 7

Helper function converts longitude pixel value for display in image map.

2 calls to _geolocation_html5_lng2px()
geolocation_html5_field_formatter_view in modules/geolocation_html5/geolocation_html5.module
Implements hook_field_formatter_view().
geolocation_html5_field_widget_form in modules/geolocation_html5/geolocation_html5.module
Implements hook_field_widget_form().

File

modules/geolocation_html5/geolocation_html5.module, line 173
HTML5 widget and formaters for Geolocation.

Code

function _geolocation_html5_lng2px($longitude, $leftLongitude, $width) {
  return fmod(($longitude - $leftLongitude + 360) / 360, 1) * $width;
}