Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SVG Map - Resizing circles onzoom and providing a hovering legend.

Posted on 2004-08-03
3
Medium Priority
?
395 Views
Last Modified: 2012-06-21
Here is a demo of the svg my program is producing: http://www.dcs.ex.ac.uk/ug/cs02/djm/demoMap.svgz

I would like the spots to become smaller when a user zooms in (aswell as bigger again when someone zooms out). Clearly the circles will therefore need to be in a group.

I would also like to provide a hovering legend in the top left of the screen whoes size and position is not affected by the user scaling or panning/scrolling. Idealy this window would be moveable by the user.

Thanks for your help,
Dan.
0
Comment
Question by:Dandalf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Author Comment

by:Dandalf
ID: 11714078
First bit solved and looks like this:

         var svgdoc,svgroot;
       function doZoom(evt){
             var spots = svgroot.getElementById('spots')
             var nodes = spots.childNodes;
             for(var i=0; i<nodes.length; i++){
                   if(nodes.item(i).nodeType == 1){
                         nodes.item(i).setAttribute('r', 3/svgroot.currentScale);
                   }
             }
      }

Still looking to get a floating legend working however.

Dan.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12637543
PAQed with points refunded (240)

modulo
Community Support Moderator
0

Featured Post

Certified OpenStack Administrator Course

We just refreshed our COA course based on the Newton exam.  With 14 labs, this course goes over the different OpenStack services that are part of the certification: Dashboard, Identity Service, Image Service, Networking, Compute, Object Storage, Block Storage, and Orchestration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question