我正在尝试使用Lat/Long变量来更新嵌入式OpenStreetMap地图。
但是iframe中的链接有4个数字而不是2个,(例如:-10.5029
,36.3151
,38.5400
,54.2652
)。
有没有人能告诉我这是什么格式,因为我想把我的长/短数字转换成它?
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-15.996
%2C36.31512514748051%2C33.04687500000001%2C54.265224078605684&layer=mapnik" style="border: 1px solid black"></iframe><br/>
<small><a href="https://www.openstreetmap.org/#map=5/46.012/8.525">View Larger Map</a></small>
您的src
属性的URL中的坐标在小数点之前也有2个数字,但逗号已被替换为'%2C'。你可以用逗号替换它,然后用你自己的坐标。它会给你同样的结果。
前-15.996%2C36.31512514748051%2C33.04687500000001%2C54.265224078605684
After-15.996,36.31512514748051,33.04687500000001,54.265224078605684
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-15.996
,36.31512514748051,33.04687500000001,54.265224078605684&layer=mapnik" style="border: 1px solid black"></iframe><br/>
<small><a href="https://www.openstreetmap.org/#map=5/46.012/8.525">View Larger Map</a></small>