外部链接到leafletjs-map上的位置

时间:2015-04-23 07:51:39

标签: php jquery leaflet

我正在尝试获取外部链接以导航到leafletjs-map上的给定坐标。

我尝试了这里描述的方法:Leaflet zoom on locations using multiple links

当我将链接放在与map-div相同的文件中时,这是有效的。 但我需要在外部文件中创建链接,我将其包含在div中,每30秒自动重新加载一次。

我已将所有文件粘贴到此Plunker中:http://plnkr.co/edit/qLHhNv3eDXxFR0pT1cds

index.php我有以下代码来自chkIncludes.php #results中的<script type="text/javascript">// <![CDATA[ $(document).ready(function() { $.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh setInterval(function() { $('#results').load('chkIncludes.php'); //#results-div is located in main.php }, 30000); // the "30000" here refers to the time to refresh the div. it is in milliseconds. }); // ]]> </script> 自动刷新内容 -

main.php

然后我将index.php包含在main.php的正文中。

#results我有chkIncludes.php - div,可以使用chkIncludes.php中的内容自动加载。

x <- c(1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5) 只是一个php文件,其中包含了很多ping脚本。

我想将每个ping脚本的输出转换为指向地图上位置的链接。

任何有助于此工作的帮助将不胜感激! 谢谢!

0 个答案:

没有答案