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)
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.