add labels to Station map

This commit is contained in:
oliver 2016-02-02 10:33:17 +01:00
commit f0ea809813
2 changed files with 38 additions and 12 deletions

View file

@ -12,9 +12,19 @@
floatval($station['latitude'])
);
$coordinates[] = $coordinate;
// Marker
$features[] = array(
'type' => 'Feature',
'id' => $station['id'],
'geometry' => array(
'type' => 'Point',
'coordinates' => $coordinate
)
);
// Label
$features[] = array(
'type' => 'Feature',
'id' => $station['id'].'-label',
'properties' => array(
'name' => $station['title'],
),