[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: A few general questions about SVG


svg zoom
Hi Roger,
 
I am sure there are better people out there to answer this question-- but I will take a stab:
 
>>1. Suppose that I render an SVG document in a browser (using the Adobe SVG plugin).  My experiments show that I can right-mouse-click on the image and select Zoom in.  However, my experiments also show that I can only Zoom in 3 or 4 times, at which time the Zoom in menu pick gets grayed-out.  Does SVG limit the level of Zooming in, or is that a limitation of the Adobe renderer?<<
 
This is an implementation specific detail.
 
>>2. Continuing with the last question ... Suppose that I have a map of a country.  How much detail can be put into the map?  Can I put details down to the level of a building, on a street, in a city, in a state in the country?  Can I then Zoom in from the country level down to see the building?<<
 
Theorectically, yes. Though I suspect this would be extremely unlikely. Imagine diagraming every building in the country in a single image. This would be immense-- and I doubt there is a renderer that could handle it-- and unlikely any computer to hold the diagram in memory. To do it you would probably want to work from a generated SVG that pulled items out of a database for each level (ultimately a new SVG for each area). But it is "possible"-- especially because SVG allows you to maintain your own coordinate spaces-- so when you zoom you are not zooming in on pixels but regions.
 
>>3. Can I associate textual information with parts of the SVG graphic?  For example, if I have a graphic of a country, I might like to associate some textual information for each city.  Is it possible to hide the textual information until the user, for example, right-mouse-clicks on the city?<<
 
Yes, but right clicking is perhaps a bad method because working with a context menu is implementation specific. A click or a key could very easily allow you to "popup" an informational window or context help. This can be done through javascript or smil.
 
>>4. Continuing with the last question ... Can I associate different textual information with different scales?  For example, when the graphic of the whole country is being displayed I want to display text relating to the whole country.  When the user zooms down to a city, I want text relating to that city.  Thus, is it possible to associate different text with different zoom levels and different parts of the graphic?<<
 
Yes. Lance Dyas posted this sample to the svg-dev list on Friday. It shows some of what you are asking-- though the example was intended for a different purpose.
 
http://www.dyasdesigns.com/svg/mtsthelens.svg
 
Given time, I could probably come up with some more examples showing almost exactly what you are describing.
 
>>5. Suppose that I want to create an SVG image of a country.  I cannot imagine handcrafting an XML SVG document.  How do you suggest that I create the SVG document?<<
 
There are a number of tools that work from images to generate path statements for SVG. Adobe Illustrator is a good example-- anything done there can be saved to SVG. Additionally, there are some great pure SVG tools out there such as XStudio (http://www.evolgrafix.com). I believe there are some opensource converters out there, but don't know them off hand.
 
Hope this helps,
 
Jeff Rafter

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.