Solved

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

Posted on 2004-08-03
3
394 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

632 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