Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/451.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
Javascript 这里将API映射到同一页面中的JQuery UI对话框_Javascript_Jquery Ui_Here Api - Fatal编程技术网

Javascript 这里将API映射到同一页面中的JQuery UI对话框

Javascript 这里将API映射到同一页面中的JQuery UI对话框,javascript,jquery-ui,here-api,Javascript,Jquery Ui,Here Api,在包含jQueryUI对话框小部件的网页中使用heremapsAPI时,我遇到了一个问题。问题发生在Chrome浏览器中。打开和关闭对话框小部件后,如果我尝试缩放或平移,则地图未正确刷新,控制台显示以下错误: Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception base.js:159 TypeError: undefined is not a function base.

在包含jQueryUI对话框小部件的网页中使用heremapsAPI时,我遇到了一个问题。问题发生在Chrome浏览器中。打开和关闭对话框小部件后,如果我尝试缩放或平移,则地图未正确刷新,控制台显示以下错误:

Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception base.js:159
TypeError: undefined is not a function base.js:159
我在Safari浏览器中也遇到了这个错误。这在Firefox或Internet Explorer上运行时没有任何错误。此错误发生在HERE API的2.5.4版上,而不是以前的2.5.3版上

以下网页显示了Chrome浏览器中的问题:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>HERE map with JQuery UI dialog</title>
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css">
</head>
<body>
    <div><button id="bOpenDialog">open dialog</button></div>
    <div id="mapContainer" style="width:400px;height:250px;"></div>
    <div id="dialog" title="Test dialog">
        <p>Dialog content.</p>
    </div>

    <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
    <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
    <script type="text/javascript" src="http://js.api.here.com/se/2.5.4/jsl.js?with=maps"></script>
    <script>
        nokia.Settings.set("app_id", "APP_ID");
        nokia.Settings.set("app_code", "APP_CODE");
        $(document).ready(function() {
            $('#bOpenDialog').click(function(){
                $("#dialog").dialog("open");
            });
             $("#dialog").dialog({
                height: 140,
                modal: true,
                autoOpen:false
            });
            var map = new nokia.maps.map.Display(
                document.getElementById("mapContainer"), {
                    zoomLevel: 10,
                    center: [52.51, 13.4],
                    components : [new nokia.maps.map.component.Behavior()]
                }
            );
        });
    </script>
</body>
</html>

这里是带有jqueryui对话框的地图
打开对话框
对话框内容

nokia.Settings.set(“应用程序id”、“应用程序id”); 诺基亚.Settings.set(“应用程序代码”、“应用程序代码”); $(文档).ready(函数(){ $('#bOpenDialog')。单击(函数(){ $(“对话框”)。对话框(“打开”); }); $(“#对话框”)。对话框({ 身高:140, 莫代尔:是的, 自动打开:错误 }); var map=新的nokia.maps.map.Display( document.getElementById(“mapContainer”){ zoomLevel:10, 中间:[52.51,13.4], 组件:[新建nokia.maps.map.component.Behavior()] } ); });
页面加载后,映射将正常工作,但当打开和关闭对话框时,将发生错误


谢谢您的帮助。

您仍然看到此错误吗?它是仅在jQuery 1.10.4中发生还是也在1.12.1中发生?