1

i have a map of the US:

http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg

i am trying to embed this code in it:

http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/

as you can see it has CSS and javascript

however, i am having a very diffficult time trying to place the css and javascript in the right area. can someone please help me

i am doing this frmo the svg:

and when there is actually a mouse over, it is not doing anything

2
  • This may NOT directly answer your question, but the source page of your .svg file actually uses an image to display the map.<img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png" width="30" height="40" /> Commented Aug 24, 2010 at 19:43
  • and here is another one:(the bigger one) <img width="800" height="495" alt="File:Map of USA with state names.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Map_of_USA_with_state_names.svg/800px-Map_of_USA_with_state_names.svg.png" complete="complete"/> Both of those were pulled from that page source :) Commented Aug 24, 2010 at 19:44

1 Answer 1

2

NOTE: VIEWERS: I KNOW THIS DOES NOT MATCH THE QUESTION SPECIFICALLY: IT IS MY ATTEMPT TO HELP THE POSTER GIVEN A BROADER VIEW OF QUESTIONS POSTED.

I am going to indirectly answer your question given my overview of your other questions.

My assumption: You wish to display a text box given the mouse over of a certian area of a map. On the original page you posted

Thus, you need to investigate this: http://www.w3schools.com/js/js_image_maps.asp regarding image maps. THEN you can put the nice box/text visuals associated with the area on the image over which your mouse moves.

This is much more highly supported than the direct svg method you are attempting, which is not supported well.

To get the image, you can right click it on that page and "save picture as" in your browser.

NOTE: There is a 400px map at the bottom of that page, clicking the "EDIT" link to the right of that will show you the image map for that resolution of a map which might be a good starting point should you wish if to be of a different size (other than 400px). Thus you would need to modify the numbers on that image map if you scale the map to another resoultion on your page.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.