A jQuery Plugin for Zoomable, Interactive Maps
What is it and why was it built?
A couple of months ago we launched a site about Marine Science in North Carolina with one of our design partners, Liaison Design Group. A key part of the project was an interactive map that allowed visitors to find important Marine Science resources in North Carolina.
Each location on the map would be represented by a bullet. Clicking the bullet would bring up more information on the location. Since the locations of the bullets tended to be highly clustered, zooming into select subregions was possible.
We wanted the experience to be engaging as possible but also easily updatable in the future. We settled on jQuery as the interface technology to use as it made it simple to build, display and animate the map. I did a longer writeup on the detailed mechanics of how this worked two weeks ago in one of our most popular posts. Due to the great feedback we got on it, this is a follow-up with a revised version of the code as a jQuery plugin which should make it easier to integrate into other projects.
Demos
This project is being used in production on a number of sites. Below is a listing of a couple. If you have used this in a project you would like to see listed, let me know.
| NC Marine Science | Sici.org | Raleigh Photonics |
![]() |
![]() |
![]() |
| Liaison Design | Shadowbox Creative | Liaison Design |
Documentation
Limitations
This was originally developed for one project with very specific requirements. While I have taken the time to generalize that code into a plugin, I have not made it as generic as I would have liked and will do more in the future to improve it given enough interest. Here is a list of its current biggest limitations:
- Data Required In Plugin Setup - Ideally all of the required data would be stored in the html pages that drive the bullets. This would allow a CMS to more easily generate additional depth levels without needing to play with the javascript. All that is required in the js now is an array of the sub-regions along with their dimensioning data.
- Data Accessibility Unaddressed - The plugin currently does nothing on its own to make content available to search engines and those with disabilities. This is left up to the developer to do, though it shouldn't be too challenging since the plugin requires all of the data to be expressed in html.
- API - Right now it is impossible to programatically interact with the map once it is launched. Eventually it will have a simple API to assist in navigation and other manipulations.
Even with these limitations, this is ready for production and is being used on several sites as seen above in the demos.
Instructions
There are four main components required to make the plugin run: the background images, links to pages that contain html data in the correct format, some CSS for style and finally the plugin call. Below are instructions on each.
1. Background Images
There are very limited requirements on the background images:
- They must all be the same size. Sub-region background maps grow to fill the entire map area
- They should line up. Just prior to zooming, a sub-region map is placed over an area of the main map, if this doesn't line up properly, some of the zooms effect will be lost.
- The main map should highlight the zoomable regions. The plugin does not otherwise make these obvious. (Though the css could be edited to add a border or background image to the zoomable region.)
2. HTML Data
The plugin assumes a certain structure for the html data it loads via AJAX. As long as the basic structure is kept, a developer is free to add any type of content styled however they would like. Aside from the unavoidable requirements imposed by the animation, all style is isolated to CSS.
The HTML format contains information for the location and applied class of the bullets, a convention based link between the bullets and the pop-up content and the content itself. The html returned should just be a listing of the bullets and popups in the following format:
[ POPUP CONTENT ] Close
[POPUP-ID] should be unique for each bullet/popup. The jQuery uses this along with the "-box" convention to open the correct popup when a bullet is clicked.
3. CSS Style
As much as possible, the plugin is designed to operate exclusively on the DOM, leaving styling up to CSS. A basic css file is included with the demo zip. Here is some rough minimal css:
#map { position: relative; width: 700px; height: 470px; overflow: hidden; }
#returnlink { display: block; position: absolute; bottom: 0; right: 0; }
#map a.bullet { display: block; position: absolute; width: 10px; height: 10px; background: yellow; }
#map img.zoomable { }
#map div.popup{ display: none; position: absolute; width: 200px; height: 300px; }
#map div.popup a.close{ display: block; position: absolute; bottom: 0; right: 0; }
The code above will work just fine as a starting point. Obviously a lot of embellishment can be added to make the map look as good as the one's Liaison designed in the examples. Here are some things to note:
- The main '#map' container must be positioned absolute or relative.
- Popups must have 'display: none' set to make sure they don't flicker when they are loaded.
- Popups must be positioned using CSS. The jQuery only shows/hides them.
4. jQuery Plugin Call
The last piece that needs to be put in place is a call to the jQuery zoommap plugin that makes it all happen. In the call, we must pass the in some settings as well as a data structure that sets up the map and its different zoom levels. Here is a call for a simple two level map that contains all of the possible settings:
$('#map').zoommap({
// Width and Height of the Map
width: '500px',
height: '580px',
//Misc Settings
blankImage: 'images/blank.gif',
zoomDuration: 1000,
bulletWidthOffset: '10px',
bulletHeightOffset: '10px',
//ids and classes
zoomClass: 'zoomable',
popupSelector: 'div.popup',
popupCloseSelector: 'a.close',
//Return to Parent Map Link
showReturnLink: true,
returnId: 'returnlink',
returnText: 'return to previous map',
//Initial map to be shown
map: {
id: 'campus',
image: 'images/campus.jpg',
data: 'popups/campus.html',
maps: [
{
id: 'quads',
parent: 'campus',
image: 'images/quads.png',
data: 'popups/quads.html',
width: '200px',
height: '232px',
top: '18px',
left: '176px'
}
]
}
});
Here is a breakdown/description of each of the settings:
- width/height - The width and height of the map container.
- blankImage - Path to an (transparent) image that will be used over the zoomable regions until their map is loaded.
- zoomDuration - Duration in milliseconds of the map zoom effect.
- bullet(Width/Height)Offset - Offsets that allow the coordinates of the bullets to be placed in the center of the target, rather than the corner.
- zoomClass - Class that should be applied to the zoomable region imgs.
- popupSelector - Selector the plugin should use to find the popups in the html
- showReturnLink - Whether a return link should be shown on child maps
- returnId - Id to use for the return link.
- returnText - Text to be placed in the return link.
- map - The top level map that should be shown.
Additionally each map has the following properties and can infinately nest more maps:
- id - Id that should be used for the zoomable region.
- image - Path to the image that should be used for the map. This image should be large enough to fill the entire map space.
- data - Path to the html data for the maps popups and bullets.
- width/height - Width and height of the zoomable region.
- top/left - Absolute position of the zoomable region
- maps - Children maps.
Here is a minimal call that relies on the default settings:
$('#map').zoommap({
width: '500px',
height: '580px',
blankImage: 'images/blank.gif',
map: {
// Map structure
}
});
And here are the default settings:
settings = $.extend({
zoomDuration: 1000,
zoomClass: 'zoomable',
popupSelector: 'div.popup',
popupCloseSelector: 'a.close',
bulletWidthOffset: '10px',
bulletHeightOffset: '10px',
showReturnLink: true,
returnId: 'returnlink',
returnText: 'Return to Previous Map'
}, settings);
Download the Project Zip
View the project Demo or download the project zip.
Questions/Comments?
This project will be revised in the future and is certainly open to suggestions. If there are any suggestions or questions, please leave them in the comments.



| Permalink
Thank you for sharing the code and documenting it so thoroughly. I started down the path of reverse engineering what you'd already written, but it was taking way too much time ;)
| Permalink
Let me know if you have any trouble with this Geof -- I'm happy to help! Also be sure to share your project once it is up and running.
| Permalink
This is an awesome effort, thankyou for making it!
| Permalink
Plugin is very nice and easy to set up but I've had inconsistent results of using the hash in the url. It seems to work for the first area sporadically and not at all for the other areas.
| Permalink
Kevin,
Is there any way you could zip your project and send it to joel@newmediacampaigns.com along with a description of the issues you are having? I'll look into it and get back to you.
| Permalink
Very nice. Can this script be used commercially? If so, please get back to me with licensing terms and conditions.
Keonne
| Permalink
Kevin,
I've sent you an updated script that allows for hashs in the url. I've also updated the zip file on this post.
| Permalink
I am almost finished implementing the map plugin, I am having a problem with a 3rd level map where the return link does not work.
See: http://savourmuskoka.com/map
Click the top right sector and then click on Huntsville on the next map, the return link does nothing?
Thanks..
Steve
| Permalink
Hello everyone,
Somebody Help me out for problem....
The given example runs fine on my PC... but when I uploaded it to server (Linux), the bullets did not appear. uploaded examples link is http://www.ushawoods.com/test/u2/example.html
Thanks
| Permalink
@Steve I will take a look at this and let you know what I find.
@Pratik It looks like the bullet data is not loading. Try checking your paths.
| Permalink
@Pratik and @Joel,
Im having the same problem. Just as a test I simply uploaded the demo, didnt change the file structure at all. No bullets.
http://eleph.us/zoommap/example.html
Despite that, great work Joel!
JPS
| Permalink
Hi,
congratulation for this great work, but... there is a little problem with internet explorer...
If you click and zoom an area, then return to map and reclick again the area, it doesn't work.
You must to close and reopen the browser if you want to work on it...
| Permalink
@Joel - Just in case my email is: sts at ihosttech.com
| Permalink
Absolutely love this kind of map. Got it to work fine, however I run into a problem with the Safari browser, similar to what Luther above mentions for Internet Explorer:
Click and zoom into an area, and the bullet data shows up. Zoom out, click another area, zoom in and bullets show up. Move to another site/page, then return to the map. Click the same zoomable areas again and there are no more bullets.
It looks like it only happens with Safari, I do not experience problems in other Browsers.
Keep up the good work!
| Permalink
@Pratik and @Joel and @JPS
first of all a big thanks for making this map
i'm having the same problem as Pratik and Joel and JPS
you can change the paths to images no problem but if you change the paths to the bullet html/data they don't show up
any ideas what can be tweeked to fix this? or am i doing something wrong? i checked the paths carefully
regards
dean
| Permalink
@all I am on the road today through Monday. Ill look at these issues and let you know what I find early next week.
| Permalink
thanks joel - it would be a big help
also (and i know i'm being super cheeky here) - i can't seem to work out how to add another zoom map region on the main map
do i just add the code to setup.js file in this bit?
//Initial Region to be shown
map: {
id: 'uk',
image: 'images/uk.jpg',
data: 'popups/uk.html',
maps: [
{
id: 'scotland',
parent: 'uk',
image: 'images/scotland.jpg',
data: 'popups/scotland.html',
/*click/zoom area size and placement*/
width: '100px',
height: '100px',
top: '0px',
left: '0px'
/*click/zoom area size and placement ends*/
/*More maps can be nested
maps : [ ] */
}
if there's any way you could give a bit of guidance (or code) i'd be forever in your debt
dean
| Permalink
scrap last comment - worked it out - was missing a comma between maps! doh!
| Permalink
Great work.. just wanted to ask about IE6 compatibility?
I want to incorporate this at my work, and unfortunately we still have a lot of IE6 users.
When you click into a zoomed map, then click back out, the original map disappears.
Otherwise this is a great product! Very useful.
| Permalink
unfortunately this map does not work in ie6 ie7 or Opera (mac and pc)
the linked to project does at the marine science site
but this demo does not
shame - just spent 3 days working on it
| Permalink
@chris @dean
The bug with the original map background image disappearing in IE6 has been corrected. The zip has the updated files.
| Permalink
@Joel - Any luck with figuring out why my 3rd level maps won't work with return link?
Thanks! - Steve
| Permalink
I seem to be having a problem on some of the maps (including my own) in IE 7+, (it behaves as expected in FF3..), where the initial zoom works fine, but after returning to the original map and trying to zoom again, nothing happens, typically.. the zoomable area and bullets disappear..
Great plugin though, its working out great other than this
Thanks!
| Permalink
@all
For anyone experiencing the problems in my post above, and to notify Joel of my changes/solution, I was able to solve the issue by slightly modifying the plugin.
jQuery Documentation on element load event:
Note: load will work only if you set it before the element has completely loaded, if you set it after that nothing will happen. This doesn't happen in $(document).ready(), which jQuery handles it to work as expected, also when setting it after the DOM has loaded.
Working under this assumption, i modified the plugin to wire up the zoom image load events before applying the the source images on a zoom..
Original Code:
$(this).hide()
.attr('src',region.image);.load(function(){
$(this).fadeIn('slow').animate({
...existing code...
displayMap(region); }); });
Modified Code:
$(this).load(function(){
...existing load code...
});
$(this).siblings().fadeOut();
$(this).hide().attr('src', region.image);
Of course this should be tested a little more thoroughly, but it seems to work for me well so far.. Definitely a relief to get it working reliably in IE! :-)
Thanks!
| Permalink
I also made a few other minor changes, such as allowing the user the ability to choose what corner the returnLink shows up in, etc... I will send you the new plugin soon for you to consider the changes :-)
| Permalink
@Kyle Send it over and Ill take a look. I am also planning on adding a couple of other changes that could make using the map handier.
| Permalink
@steve Things are testing fine for me here. Could you send over a zip of your project and Ill take a look.
| Permalink
hi. i have the basic problem of creating child maps in the setup.js
Do i replicate the map:{} code or maps : [{}]? Tried the latter but the page turned blank..changed even the maps : [id: field]
someone pls help!
| Permalink
fixed my problem..have a new one..I am able to access only one map outta four though ive changed the map id and image location
| Permalink
A strange one here.
I've created pins for the clickable popup data. They show up fine on my machine and also in localhost. When I upload to webserver the pins don't show and i can't click the areas.
This is an annoying problem since it seems so simple.
Help?
| Permalink
I managed to fix the pins that were not showing up by just renaming the html files inside the popups folder to php
| Permalink
@Juan
your solution worked for me .. :) Thanks
@Joel
Thanks for your efforts.
| Permalink
Top marks for your efforts here, great job Joel! My question is... how can I remove the extra map levels. i.e. I want to have a map that only has clickable bullets with info popups. Cheers.
| Permalink
Forget my last comment. Got it! Much respect to ya.
| Permalink
Hi;
I want to duplicate Initial map to show 2 place can be zoom.
I don't know where I should put the codes,
can you tell me what should I do?
Regardes
| Permalink
Ben, I'm trying to do the same thing. If you are still reading this, can you share how you did this?
| Permalink
Ben and Ragdoll,
Just set "maps" to a blank string or empty. That should do the trick.
Ragdoll -- Nice to see your connection to Arbor Day. I am originally from Nebraska!
| Permalink
joel-
I am still getting the IE6 background image bug... I downloaded the zip file listed above (and have read through the comments) but in IE6 the background disappears when you click to return to the main map.
Any help would be awesome!
| Permalink
I have two things: one bug and one that may be helpful to others.
1) Like sam ambrose, above, the background disappears in IE(6&7) when I return to the main map.
2) I solved my first problem I mentioned earlier in the comments. I'm not sure if Joel's explanation works, but here is what I did. Since none of my maps will ever have bullets, I commented out the "//place bullets" code inside loadRegionData, and then after the "//Create Return Link" code, before the closing load bracket, I added "showPopup($(region).attr('id'));"
You still need both the <a> and the <div> in the HTML data, though you'll want to use CSS to change the <a>'s visibility to "hidden". You don't have to put all the HTML data in individual files; you can put them all in a single file, as long as everything has its own name.
Hopefully this helps somebody in the future.
| Permalink
Does anyone have a solution to the IE6 background 'houdini'?
I am 90% done with launching a new subsite and the map is essential... but like everyone who designs/develops I fall victim to the IE majority when it comes to our target audience.
| Permalink
Sam,
Could you send me a link to the site you are working on. I will take a look and see what I find. There are a number of deployments out there working great in IE so it is probably something small.
| Permalink
Joel:
I just finished an implementation of your plugin, which is really great, as a building map, but IE6 is a problem.
The map is for a public library.
http://www.westlakelibrary.org/?q=wpplmap
My IE6 issues largely have to do with transparencies. I have a hovering transparency for the different regions of the building, and I used blank images linked to popups for rooms and things that weren't suited to the bullets. I'm using transparent pngs. Should I switch to transparent gifs? (maybe not in the scope of your plugin, but thought I'd ask.).
Thanks for your work. I aim to make another building map for staff as a safety training tool.
Matt
| Permalink
Matt,
Gifs will be easier. There are complications using 24-bit pngs in IE6 -- especially when they are being created and destroyed.
You can use them, but if you can get away with gif files I would suggest it.
| Permalink
Joel-
I've downloaded the zipped folder(above), extracted and placed on the server.
Here is the url- http://lcmsdistricts.org/zoommap/example.html
thx in advance
| Permalink
Matt-
Sorry for the delay...
My link is- http://www.lcmsdistricts.org/zoommap/example.html
I also noticed your demo has the same IE6 bg problem-
http://www.newmediacampaigns.com/files/posts/interactive-map/zoommap/example.html
thanking you in advance
| Permalink
Has anybody figured out the IE Houdini Bug, yet? I've got a project that is finished except for this problem. I'd love to hear any possible solutions.
| Permalink
This might help get closer to the solution, but JavaScript isn't my strong suit, so I don't exactly understand what's going on here.
In the displayMap function, there is a variable set called "check", which isn't used anywhere else in the code. Check checks the css background-image. If you put "alert(check);" after this, the background will show up along with the alert.
Why would this happen? Oh IE, why can you never play nice?
| Permalink
So does that solve it? If so be sure to send over your changes and I will update the plugin.
| Permalink
It doesn't really solve the problem, because then you have an alert going off every time a new background is set.
But I don't know why IE won't set the background otherwise.
I notice it works fine on Sici.org, but they also have the backgrounds fade in and out, which your plug-in does not. I'm going to try to incorporate this into my own code, but I need some time to figure out how to make it work; Sici's code is a little bit different, and I haven't figured out how to duplicate it with what I have.
| Permalink
Joel,
Recently a client contacted me for a web-related job that includes an interactive map, so your post really help me a lot.
Here goes my question: In order to catch dynamic data, How'd you do it?
The facts: You have a CMS relational db with "customers" and "events" published by them ("tomorrow 10% disc. on pizza"), and I want the map to grab the customer data AND the events associated.
Would you mess directly with database, middleware or framework? Or let the CMS to generate the html on load before jQuery grab that data?
It will be a charm if you can tell me your opinion about that, since the work you've done seems to be the best aprox. to the solution i was thinking.
Thank you in advance,
Mauko Quiroga
| Permalink
Mauko,
The data is already being loaded via AJAX. So all you need to do is make sure that your CMS is generating the pages dynamically and you will be good to go!
Joel
| Permalink
Dear Joel,
Thank you very much for this great plugin. I am actually building a site and I am trying to use it. Actually, I'm a big novice in java and I only manage to change some elements... I am using the bullets but I also would like to use some bigger "zones" that would have the same effect (same type of popup appearing).
I tried to create a #map a.zone in the css file but it didn't work... Or is there a way I can do it through the setup.js by changing the 'quads' part? I don't need the zoom, just a popup.
Thank you for your help!
| Permalink
Mina,
You can control the size of the bullets using CSS. You can even control them individually using their ids.
Joel
| Permalink
Joel,
Thank you, I've finally managed to do it! (that was just a simple thing I had to change)
Now I have another problem - sorry to bother you, I guess this is just a simple thing I have not done correctly again but I've been spending hours without figuring out what it could be : the plugin works fine but my other divs now get crazy. The size of the text is automatically reduced and I don't know why.
If you have time to take a look, I have given the direct link to the page. Thanks again.
| Permalink
| Permalink
Really great implementation of jQuery. I was also wondering if this may be used commercially, and if so, what the conditions are.
| Permalink
Spec,
It is under the MIT License so you can do just about anything with it, commercial or otherwise.
| Permalink
Thanks, I actually just stumbled across the mention of the license in the js file. :) Totally awesome.
I think the only extra functionality that would be really great to add to this would be the ability to toggle the bullet points so that you could show all of x, or all of y bullet points. Probably just a simple addition when it comes to jQuery, but I haven't looked into it yet.
| Permalink
Spec,
You can toggle the bullets easily. Just give each one a class (you may have done this already to style them). Then you can do something like:
$("#redtoggle").click(function(){
$(".red").show().siblings().hide();
});
| Permalink
Hi Joel! First, I would just like to thank you for the great plugin. I was initially building my map in javascript, so I'm really enjoying how much easier this is to work with.
That being said, I do have a question about something. The problem in my case is that my zoomed regions do not always look proper when resized to the same dimensions as the parent map. I also noticed that if the zoomed region doesn't cover the parent map completely, it is tiled.
Is there any way to adjust this behavior? Ideally it seems like it should show the parent map underneath if they're not the same size, or perhaps a solid background. Thanks!
| Permalink
E.,
You will need to work on the css and the plugin code itself to make this happen. Ideally you could use zoomed regions of the same aspect ratio.
If you want to have a zoomed region partially cover the map you will need to edit the js that animates on zoom. You may also need to add options to the plugin that allows you to specify dimensions of the maps. It might be a performance issue to measure this dynamically.
| Permalink
Joel,
I figured out a workaround for the tiling issue. I simply modified the displayMap() function and appended:
backgroundRepeat: 'no-repeat'
where it clears the map and sets the background image. Then to fix the return link I simply changed its CSS to display on the top instead of the bottom.
This makes it so sub-maps will zoom and look correct even if their dimensions are different. Naturally if the sub-map has a shorter width, you'd probably want to position the return link in the upper left or something.
| Permalink
@samAmbrose on sept. 23 -
I'm seeing exactly the same thing you are. When I run example.html from my filesystem, it works fine -- the bullets show up (in other words, it's able to find the popup "includes" and read the bullet info like the rel attribute).
But if I take it and put it on my server with zero modifications and access example.html via http... no dice. The zoomable region zooms, the "return to campus map" link works, but nothing from the popup files is pulled in, and the bullets don't work.
As far as I can tell it's not a mapping thing. First of all nothing changes, and since it's all relative links with a very basic folder structure, it shouldn't be an issue. But if I hardcode the full URLs, still no dice.
I'd love to use this, but I'm afraid I'll have to abandon this and keep looking.
| Permalink
Any news on the IE6 problem? I have the same issue when after returning to the main map.
Click to return to the 'zoomed' area and no bullet points load.
Thanks in advance!
| Permalink
@Juan Thanks for pointing this out. Changing the file extensions to php makes the bullets appear
| Permalink
I like the custom designs that this plugin delivers but I miss the functionality the more complete APIs provide. Did you attempt to apply any custom skinning to one of the existing map api's (i.e. Google, Bing, Yahoo, etc) before going down this path?
| Permalink
Toby,
I have used the Google Maps API before -- this was certainly not intended to replace it!
It was intended to be simple from the beginning. For anything more I would recommend moving to one of the other APIs. I wrote this pre-Bing, but that seems to have an especially good one.
| Permalink
I've shared this with some designers and they're in love with what you've done so kudos to you for that. The other map implementation that I've been impressed with lately is this one:
http://rideoregonride.com/trails/
I love how attainable map functionality has become over the past few years. Thanks for adding to it.
| Permalink
WOW! That map is beautiful. I am originally an Oregon native and a biker so I find it interesting as well!
Thanks for the kind words!
| Permalink
plugin is verry nice and thankk you for sharing :D
| Permalink
I downloaded your project and uploaded it as-is to our testing server and the live server.
Testing server:
http://alpineadvertising.com/in2wireless/zoommap/example.html
Works!
Live server:
http://mycellularcenter.com/zoommap/example.html
Doesnt work : {
Any ideas why its not working? What sort of server setting would cause it not to work?
I believe for servers are windows based. I even changed the filenames a bit because I know windows is picky about filenames.
| Permalink
The inability to create the bullets have to do with script mapping of file extensions on the server. In our case, .html is not allowed for GET and POST.
The AJAX/load uses GET or POST to retrieve the popup files. So the file extension used has to be what's allowed (.aspx, .php) on your server to accept these requests.
| Permalink
hi thanks for your plugin really amazin. i have a "newbie" question: i cant add any other subregion. i tried puttin maps : [ bla bla ] under the initial region map, i tried also adding the new subregion beetween { } and nothing, a blank page appear. i tried on safari and firefox latest version, on Leopard. any suggestion? :\
regards
| Permalink
Hi.
I 'm leaving a post because I work on the plugin and I meet a difficulty. I use a cms and so I have to implement the plugin dynamically.
So in the cms I have a page with a list of blocks which represents the future bullets with information. In this page I call two files .js (zoommap.js and the file I developped). So I don't use setup.js as I want to call data in my .js file
My file.js create dynamically in jQuery the structure HTML by using DOM. Then i call the plugin
$('#map').zoommap({
width: '699px',
height: '503px',
//Initial map to be shown
map:{
id: 'map',
image: 'here I wrote url and it plays well',
data: 'here I don't find any solution'
}
});
So I would like to know the url I have to put in data or could it be a variable (as I create the structure dynamically).
Or is it a wrong way?
Thanks very much for your help.
| Permalink
Plugin works fine no problems at all! very good job! keep on..
| Permalink
great plugin.. 'm going to try it on my next project
| Permalink
Firstly thanks for the code. I'm pretty poor on coding but would like to use this in a slightly different way by putting an image of a different map in the popup content html rather than using the zoom effect. However when I try to do this the image won't show. It's probably a very basic question I know, but any help would be appreciated.
Thanks
| Permalink
Greg,
If you visit the url source of the popup that is being pulled via ajax can you see the image?
Are you using a relative or absolute url as the image source?
| Permalink
For those with the problem of the popup files not loading (the bullets don't appear). If you're running IIS and a .NET server changing the file names to .aspx (instead of .php) solves the problem as well.
Thanks!
| Permalink
"The AJAX/load uses GET or POST to retrieve the popup files. So the file extension used has to be what's allowed (.aspx, .php) on your server to accept these requests."
There should be a way to enable IIS to handle that type of request so changing file extensions isn't necessary. Off to research!
| Permalink
"Are you using a relative or absolute url as the image source?"
DOH!!
Thanks Joel - I always miss the little things! I'll post a link when it's finished. Thanks again for the code.
| Permalink
Ragdoll: I tried your solution from october 7th to get the map to refresh in ie6. it will only work with the alert. am i missing something. i placed the
map.css('display','none');
map.css('display','block');
15 plus times after the
'var check = map.css('background-image');
my placement may not be right? anyway, is there a way to have the screen refresh from the 'return to full map' link?
thanx.
| Permalink
how to add an additional nested map? please help me posting an example code, i cant find out :(
| Permalink
Mike, to nest additional maps make sure that you have a comma in between each nested map...
Example:
maps: [
{
id: 'quads',
parent: 'campus',
image: 'images/quads.png',
data: 'popups/quads.html',
width: '200px',
height: '232px',
top: '18px',
left: '176px'
},
{
id: 'otherMap',
parent: 'campus',
image: 'images/otherMap.png',
data: 'popups/otherMap.html',
width: '200px',
height: '232px',
top: '40px',
left: '380px'
}
]
| Permalink
Hey wow! I was going to reinvent the wheel... Lol!
| Permalink
I downloaded the Project Zip using link above and have trouble with zooming. Plugin working properly only with Firefox (ver. 3.5.7). In Opera (ver. 10.10) and IE 8 zooming works only at first time when html page loaded. What i do:
1) Open example.html (from Project above)
2) Click on zoomable region
3) It zooms with animation
4) Click "Return to campus map" and it closes
5) Click again on zoomable region. Bullets fades out, but after it nothing happens. Map becomes inactive (just picture). If i reload page, bullets appears but when i click on zoomable region, bullets fades out and nothing happens. Etc.
Strange feature in Opera: if you click twice on zoomable region, it zooms and works always, but two zoom maps open.
I thing something wrong in addZoom function (zoommap.js). In line 135:
$(this).siblings().fadeOut();
All right and it works always properly (bullets fade out).
Line 137:
$(this).hide()
.attr('src', region.image).load(function(){
...
Don't work. Maybe something with compatibility of jQuery Load?
| Permalink
Hi Joel,
Can your component map a floor plan of a building and do you have any demos for that ? Thanks
Eric
| Permalink
hey there, great work !
my website has a page for the map, and a diffrent page acts as an index for all bullets..
i was wondering if its possible to create links that redirect to the map page and loads the correct map and popup ?
if possible i would appreciate some guidance :)
thanks man
yariv.
| Permalink
Nice plugin, although there's some delay in loading the zoom image and it pops in the first time you click rather than a gradual zoom (in firefox anyway).
Here's an alternative method I used for a clients site with 4 levels of zoom http://www.venusrock.com/masterplan.asp
After the first zoom in.. click different areas for popups or click venus rock signature residences to access the 3rd and 4th level of zoom (or click zoom in button down the bottom right)
| Permalink
I just downloaded this and put it on my local machine. Haven't modified anything. The map and the zoom map display fine, but the yellow bullets do not display...what am I missing?
Denis
| Permalink
This project dosen"t work well on Ie 6, ins"t it? I tested and i saw that.
| Permalink
I am trying to use this in Plone (our CMS) and in Plone I can not use '$' so I replacing all '$' with 'jQuery' and it did not work, I know you arent a Plone person but how should I run this in no conflict mode?
| Permalink
Is it possible to have the popup show on mouse over the bullet?
| Permalink
Why does not work in Opera 10.10, there is no area increase, all disappears?
| Permalink
Hi for all that can not get the bullets when integrating with a cms,
it is most likely a GET or POST setting on your platform.
I have finally managed to integrate the map into DooPHP with all data being dynamic (js on the fly).
all map data read from database. next thing up is getting the xy position for frontend so new bullets can be added :)
Nice plugin!!!
| Permalink
Hi,
Really nice plugin, is there a way to connect it to a database (drag&drop bullets on the map) ?
Thanxxx
ImIn
| Permalink
Hello,
Is there a way to populate the map with a JSON datasource instead of the html files ?
Thank you.
Rio
| Permalink
Riogrande:
Anything is possible my friend. I'm wrapping up on adapting this really cool script/app to a MODx CMS I have setup for my company's website. I'm using XML as a datasource.
| Permalink
just figured out muy issue and thought I would pass along. Had the bullets showing up in local environment, but not the server. My server is a .NET environment. Renamed the html pages in the popups folder to .aspx extensions and the bullets show up.
that's it.
| Permalink
thanks to share; great