Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 指向地图上位置的外部链接_Php_Jquery_Leaflet - Fatal编程技术网

Php 指向地图上位置的外部链接

Php 指向地图上位置的外部链接,php,jquery,leaflet,Php,Jquery,Leaflet,我正在尝试获取外部链接以导航到地图上的给定坐标 我尝试了这里描述的方法: 当我的链接与map-div位于同一个文件中时,这就起作用了。 但我需要在一个外部文件中创建链接,该文件包含在一个div中,每隔30秒自动重新加载一次 我已将所有文件粘贴在此Plunker中: 在index.phpI中,使用以下代码自动刷新chkIncludes.phpin结果div中的内容: 然后我将main.phpin包含在index.php的主体中 在main.phpI中有一个results div,该div自动加载c

我正在尝试获取外部链接以导航到地图上的给定坐标

我尝试了这里描述的方法:

当我的链接与map-div位于同一个文件中时,这就起作用了。 但我需要在一个外部文件中创建链接,该文件包含在一个div中,每隔30秒自动重新加载一次

我已将所有文件粘贴在此Plunker中:

在index.phpI中,使用以下代码自动刷新chkIncludes.phpin结果div中的内容:

然后我将main.phpin包含在index.php的主体中

在main.phpI中有一个results div,该div自动加载chkIncludes.php中的内容

php只是一个php文件,我在其中包含了很多ping脚本

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

如果您有任何帮助,我们将不胜感激!
谢谢

此插件允许您通过URL+哈希引用特定位置。谢谢@snkashis,这解决了我的问题!:
<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>