function _ip_geoloc_plugin_style_leaflet_compare in IP Geolocation Views & Maps 7
Callback to compare locations based on weight.
1 string reference to '_ip_geoloc_plugin_style_leaflet_compare'
- ip_geoloc_plugin_style_leaflet::render in views/
ip_geoloc_plugin_style_leaflet.inc - Transform the View result in a list of marker locations and render on map.
File
- views/
ip_geoloc_plugin_style_leaflet.inc, line 1785
Code
function _ip_geoloc_plugin_style_leaflet_compare($location1, $location2) {
$weight1 = empty($location1->weight) ? 0 : $location1->weight;
$weight2 = empty($location2->weight) ? 0 : $location2->weight;
return $weight2 - $weight1;
}