fix handling of null-values for coordinates of Character groups Quest Stations

This commit is contained in:
oliver 2016-01-14 19:19:12 +01:00
commit 33e1c4d8b5
2 changed files with 19 additions and 34 deletions

View file

@ -6,6 +6,7 @@
// Add points // Add points
foreach($stations as &$station) foreach($stations as &$station)
{ {
if(!is_null($station['longitude']) && !is_null($station['latitude'])) {
$coordinate = array( $coordinate = array(
floatval($station['longitude']), floatval($station['longitude']),
floatval($station['latitude']) floatval($station['latitude'])
@ -23,6 +24,7 @@
) )
); );
} }
}
// Add lines between points // Add lines between points
if($hasgroup) { if($hasgroup) {

View file

@ -194,28 +194,11 @@
new ol.layer.Vector({ new ol.layer.Vector({
source: markersSource, source: markersSource,
style: styleFunction style: styleFunction
/*
style: new ol.style.Style({
text: new ol.style.Text({
text: '\uf041',
//text: '\uf276',
font: 'normal 28px FontAwesome',
textBaseline: 'Bottom',
fill: new ol.style.Fill({
color: '#0F373C'
}) })
})
})
*/
})/*,
new ol.layer.Vector({
source: pathSource
})
*/
], ],
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: ol.proj.transform([<?=$station['longitude']?>, <?=$station['latitude']?>], 'EPSG:4326', 'EPSG:3857'), center: [0, 0],
zoom: 19, zoom: 19,
maxZoom: 19 maxZoom: 19
}) })