小编Gre*_*nat的帖子

HERE Maps API与JQuery UI对话框在同一页面中

当我在包含JQuery UI Dialog小部件的网页中使用HERE Maps API时,我遇到了问题.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
Run Code Online (Sandbox Code Playgroud)

我也在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 …
Run Code Online (Sandbox Code Playgroud)

javascript jquery-ui here-api

5
推荐指数
0
解决办法
476
查看次数

标签 统计

here-api ×1

javascript ×1

jquery-ui ×1