add labels to Station map
This commit is contained in:
parent
03cc6a475b
commit
f0ea809813
2 changed files with 38 additions and 12 deletions
|
|
@ -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'],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue