-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Area specific highlight effect with alt image #90
Comments
Copy of my answer from feedback seciotn - Yes, you can. This example shows preconfiguring areas: http://jsfiddle.net/jamietre/vc8zG/ This uses altImage "aliases" - the altImage option configures the images that will be preloaded, then in the "areas" option, you tell it to use one of them (referring to its alias that you created, in my example, either img4 or img5) for "render_select" or "render_highlight", or both. The example shows Texas with two different alternate images for select & highlight, and Washington with an altimage just for select. The rest of the areas are defaulting to fills. You can also decide on the fly how to select an area using "set" e.g.
would select the area with key 'WA' and use the altimage alias img4 for the effects. You can pass any rendering options with "set" this way. |
Thanks so much! I had to use the dev version of imagemapster.js. Any idea when the next production version drops? |
Wow, I honestly thought that feature was in 1.2.6! Sorry for not pointing that out. The code for 1.2.7 is done and pretty well tested - the only real holdup on release has been me having a couple hours to write up some release notes and maybe a few more unit tests for that altimage stuff. I've been slammed at work (and also pushing out a release on another project) so I'm not sure when that will actually happen. But it is unlikely anything will change from what's here, so you should feel pretty good about using the 1.2.7 beta. |
Ok cool, beta it is! Sent some coffee money your way ;) |
Wow, thanks for the really generous contrib! I appreciate it! |
Guys using altImage produce. It seems the image is not loaded before initiates. How do I solve this?
|
@ApetweBc - The issue you are encountering is likely the same as the one identified in #316. Please see details there and try using the latest version of IM where that issue was addressed. Also, for future reference, please open new tickets when reporting issues rather than commenting on closed tickets as we're unlikely to see anything added to closed issues. |
I am trying to build 1 map that has some areas that use an alt image as the highlight effect and other areas that use fill colors as the highlight effect. Is this possible?
Can I specify an alt image and then override the area highlight part for some areas so that it just uses fillColor?...
or only specify altImage for certain areas?
The text was updated successfully, but these errors were encountered: