function _geolocation_html5_lat2px in Geolocation Field 7
Helper function converts latitude pixel value for display in image map.
2 calls to _geolocation_html5_lat2px()
- 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 180 - HTML5 widget and formaters for Geolocation.
Code
function _geolocation_html5_lat2px($latitude, $topLatitude, $bottomLatitude, $height) {
return (_lat2mercator($latitude) - _lat2mercator($bottomLatitude)) / (_lat2mercator($topLatitude) - _lat2mercator($bottomLatitude)) * $height;
}