1 回答

TA貢獻1943條經驗 獲得超7個贊
你可以嘗試這樣的事情來跳過空緯度和經度:
while ($row = mysqli_fetch_assoc($data)) {
$latitude = (float)$row['latitude'];
$longitude = (float)$row['longitude'];
if ($latitude === 0 && $longitude === 0) {
continue;
// what should i do here, ????
// var_dump('place_name');
}
// add marker to map
$marker .= sprintf('var marker = L.circle([ %s, %s],
{
color: "red",
fillColor: "#f03",
fillOpacity: 0.5,
radius: 2000
}
).addTo(map).bindPopup("%s").openPopup().on("mouseover", function (e) {
this.openPopup();
}).on("mouseout", function (e) {
this.closePopup();
});
;
', $latitude, $longitude, $row['place_name']);
}
:)
- 1 回答
- 0 關注
- 132 瀏覽
添加回答
舉報