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 关注
- 101 浏览
添加回答
举报