The extension which realizes a free zooming map
This page is English Version of the Japanese article of this blog.
SVG is vector graphics data which can be expanded and contracted without a degradation of a rendition. However, since the same data is only expanded and contracted, an information content does not change following it. On the other hand, in digital map application, the functionality to change the information content displayed with expansion and contraction is often offered.
There may be general-purpose functionality which can control the visibility of each graphics primitive according to the scaling factor of a view to realize this functionality. It seems that it is pended for the moment although the specifications which realize this were examined in the disputation stage of SVG1.2 temporarily (source). Then, the SVG Map consortium considered that this functionality was indispensable in a Web map services, and was made to extend as SVG Map Profile.
Property to extend : figure-visibility
The property which sets the parameter for controlling the visibility according to a view scale to a graphics primitive
The target containing element: Basic Shapes, <path>, <text>, <use>, <g>, <image>, <animation>
Format : figure-visibility="[minimum scale], [maximum scale]"
When a view scale is between A and B, the graphics primitive is displayed.
# Definition of a view scale
100x ([Length in the screen-coordinates system of the graphic] / [Length in the SVG coordinate system of the graphic]) [%]
Name space : The specifications extended as SVG Map Profile are embedded to a SVG data using Namespaces in XML specifications.
Namespace URL for SVG Map Profile : http://purl.org/svgmap/profile
Recommend prefix : go
<svg ... xmlns:go="http://purl.org/svgmap/profile">
<circle cy="100" cy="100" go:figure-visibility="100,200"/>
A circle graphic is displayed between the scaling factors 1. to 2..
The viewer which reads a map dynamically according to a view scaling factor
The mechanism which reads map data dynamically according to a view scaling factor is realized by extending the implementation requirements specification 2 of "SVG Map data divided into mosaic tegular" based on this extension.
The implementation requirements specification of a viewer
When this property is organized in the <image> (or <animation>) element, the map services which obtains map data dynamically according to a scale is constructed.
When the <image> element enters into the scaling-factor span which should be displayed, the viewer must implement at least the logic which obtains dynamically the graphics data which the <image> element is referring to.