Lists Home |
Date Index |
others have already answered, but some extra info can't hurt.
Roger L. Costello wrote:
> 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?
That is a strict limitation of the viewer, and not at all of the spec.
In fact, I don't know why ASV limits you to that since you can use
scripting to manipulate the viewBox attribute of the rootmost <svg>
element in order to zoom as much as you like (I suspect that you might
run into trouble if you go over 64bits but I haven't tried so I'm not
sure). Mapping apps that I've written in the past have used such tricks
to get not only a much greater range of zooms but also more fine-tuned
> 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
You can put as much detail as you like, but if your intent is to have a
map of the entire world that can be zoomed into until you see your
neighbour's dog's current location you probably won't want to ship that
in a single file :) The GIS community was one of the first to jump into
SVG and there are many ways in which incremental levels of detail can be
implemented. You probably want to ask for furthuer information on SVG
specific lists such as svg-developers.
> 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?
You can associate arbitrary XML information with SVG items, and
manipulate them with script to your heart's content. An example typical
of what you describe is tooltips. Again, if you ask on an SVG list
you'll likely get more options than you can shake a bézier at.
> 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
You can know what the current level of zooming is, and act in reaction
to that. You can get notified of when your viewbox changes and all sorts
of other interactions you might want to respond to. Not to repeat
myself, but what you're describing has already been done many times and
you could benefit from asking the same questions on SVG lists.
> 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 more ways to create SVG than I could think of, even though
I've been working in the field for several years. Since what you seem to
be interested in is a mapping application, the best way might be to
convert existing mapping information in a GIS format into SVG. If you
happen to only have very old GIS tools handy they might not export SVG,
but anything recent (and a myriad of other tools, some open source, some
free) will do it for you. I also can't think of a major (and even
amongst the minor ones it would be hard to find) 2D vectorial drawing
app that wouldn't save or export as SVG.
Pity you didn't ask earlier, I was at MITRE (the Hampton offices) two
weeks ago, we could've discussed it over beer :)