我正在为 WordPress 网站使用 jQuery Zoomable 地图插件,该网站包含两种类型的地图和图例。目前处于维护模式,尚未向公众开放。我喜欢它的放大和缩小功能。我什至向图例添加了一个触发器,以使图例中的链接触发地图上的放大和缩小,这与以下额外代码一起使用:
jQuery(document).ready(function ($) {
$('#area-one-button').click(function() {
$('#area-one').click();
});
});
但我一直遇到问题。经过几次放大和缩小后,有时缩放不再起作用,直到我刷新页面或等待几分钟。当我单击图例中的缩小按钮时,我无法再单击地图上的可缩放字段,因为它不知何故不知道我缩小了。这就是问题所在。但如何解决这个问题呢?
所有代码文件的链接位于:http://javascript.pastebin.com/qpEHcDts(只能添加一个链接)
I am using the jQuery Zoomable maps Plugin for a WordPress site with two types of maps and legends. Under maintenance mode right now as it is not open to the public as of yet. I love its zoom in and out functionality. I even added a trigger to the legend to make links in the legend trigger zoom ins and outs on the maps which works with this extra code:
jQuery(document).ready(function ($) {
$('#area-one-button').click(function() {
$('#area-one').click();
});
});
But I have been having issues. After several zoom ins and outs sometimes zooming no longer works until I refresh the page or wait for a few minutes. When I click the zoom out button in the legend I can no longer click on zoomable fields on the map as it somehow does not know I zoomed out. That is the issue. But how to solve this?
Link to all code files is here: http://javascript.pastebin.com/qpEHcDts (could only add one link)
发布评论
评论(1)
在 JavaScript 开发人员的帮助下,我成功地基于 jQuery 插件优化了代码,如下所示: http://www.gethifi.com/blog/a-jquery-plugin-for-zoomable-interactive-maps 有点。以下是 legend.js 中的代码,用于使某些区域可点击并立即提高可缩放性。
在一个地图页面上加载的基本代码本身相当大,但以下是在一个 .html 地图页面上通过代码加载的弹出窗口之一:
地图现在加载得更好,客户非常满意。
With the help of a JavaScript developer I have managed to optimize the code based on the jQuery plugin as found here: http://www.gethifi.com/blog/a-jquery-plugin-for-zoomable-interactive-maps somewhat. Here is the code in legend.js used to make certain areas clickable and to improve zoomability without delays.
The basic code loaded on one map page itself is rather large, but here is one of the pop-ups loaded by code on one .html map page:
Maps do load better now and customer is pretty satisfied.