我从我的网页创建了一张地图,显示了某个位置的 ais-ships:
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
width='40%'; //the width of the embedded map in pixels or percentage
height=430; //the height of the embedded map in pixels or percentage
border=1; //the width of border around the map. Zero means no border
notation=false; //true or false to display or not the vessel icons and
//options at the left
shownames=false; //true or false to dispaly ship names on the map
latitude=59.01; //the latitude of the center of the map in decimal degrees
longitude=5.78; //the longitude of the center of the map in decimal degrees
zoom=10; //the zoom level of the map. Use values between 2 and 17
maptype=3;
trackvessel=0; //the MMSI of the vessel to track, if within the range
fleet=''; //the registered email address of a user-defined fleet
remember=false;
scale=2;
</script>
<script type="text/javascript" src="http://www.marinetraffic.com/ais/embed.js">
</script>
</body>
</html>
我不想在代码中手动输入经度和纬度,而是希望将从例如 iPhone 检索到的 GPS 位置放在这些字段中。我已经尝试了几种解决方案,但我似乎没有得到正确的解决方案。有没有人有一个很好的解决这个问题的方法?