Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6155673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:28:32+00:00 2026-05-23T20:28:32+00:00

I have an image with an associated image map (below) and I’m using jQuery

  • 0

I have an image with an associated image map (below) and I’m using jQuery to detect when I get a mouseover on the image map elements. What I then want to do is draw some ‘stuff’ over the top of the map with Raphael js.

   <map name="regionMapView" id="regionMapView">
      <area id="Carlisle" shape="circle" coords="305,505,10" alt="Carlisle" title="Carlisle" />
   </map>
   <img id="imgMap" src="MapLarge.gif" width="585" height="1135" border="0" usemap="#regionMapView" />
   <script type="text/javascript" src="./Scripts/jquery-1.6.2.min.js"></script>
   <script type="text/javascript" src="./Scripts/raphael-min.js"></script>
   <script type="text/javascript">
      $(document).ready(function () {
         var paper = Raphael(0,0, 585, 1135);
         var t = paper.text(200, 200, "Text at 200, 200");
         $("#Carlisle").hover(function () { alert('in'); }, function () { alert('out'); });
      });
   </script>

The above shows text as it should, but jQuery will not fire the events because the Raphael canvas sits over the top of the image map (which is what I want visually) but will prevent the jQuery events from firing. If I change Raphael to use the image ID as follows;

     var paper = Raphael(document.getElementById("imgMap"), 585, 1135);

Then the reverse will happen, I’ll get the events from jQuery but the text is not visible.

The image itself is a solid colour map with no transparency.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:28:33+00:00Added an answer on May 23, 2026 at 8:28 pm

    You could just forget the image map and jQuery, and simply use Raphael over the top of the image itself.

    You could use Raphael to define circles/regions (which can be initially transparent) which you can attach custom functions/events to. In this way when the user hovers over an area of the underlying image, the Raphael functions can trigger, and you can produce your required visual feedback.

    You can find a good tutorial here that explains how to attache events to the objects you create for hover and click events. http://playground.mobily.pl/tutorials/building-an-interactive-map-with-raphael.html

    Also, view the source of the http://raphaeljs.com/australia.html example.

    I.e. something like the following will draw a circle in your map, and then animate it. But you could modify the hover event to display your text etc.

    var circle = paper.circle(50, 40, 10);
    circle.hover(function(){
                   this.animate({
                     fill: '#1669AD'
                   }, 300);
                 },
                 function(){
                   this.animate({
                     fill: attributes.fill
                   }, 300);
                 })
               });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have image data and i want to get a sub image of that
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I have an image and on it are logos (it's a map), I want
Approximate program behavior: I have a map image with data associated with the map
I use the following code to reload an image using jQuery: //Fetch image associated
I have a set of jpeg images where each image has an associated description.
I have: image 1:Many imageToTag Many:1 tag I want to issue a query that
I have an image of a basic game map. Think of it as just
I want users to be able to upload an image and have it be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.