Andre,

That was one golden nugget piece of information you gave me about 
SVG with regard to scales. I have a lot better understanding about 
viewbox and scale within SVG. I will now look into displaying 
graphical scales instead of numerical scales in my application.

Thanks a lot for your time and insight,
Kiran



--- In [EMAIL PROTECTED], "andr� m. winter" 
<[EMAIL PROTECTED]> wrote:
> hi
> 
> 
> currentScale equals 1 onload of your svg document. with following 
parameters
> 
> 1) viewBox width and height values
> 2) width/height in pixel of your viewport
> 3) preserveAspectRatio attribute
> 
> you are able to calculate a map scale. point 2 and 3 are related 
as 
> preserveAspectRatio says the viewer how to fit the drawing into 
the 
> available viewport, thus initial map units may vary.
> 
> the onzoom event triggers zoom changes and thus gives you a new 
> currentScale that you can retransform into a map scale. this stays 
true 
> as long as you do not:
> 
> a) modify viewBox
> b) change window/frame extents where the svg is displayed
> 
> because on (a) scale reverts to 1 and you have to reiterate the 
initial 
> ratio getting. on (b) things get much more complicated as viewer 
do zoom 
> AND translate.
> 
> concerning map scales on screens there is another "don't": you 
cannot 
> show up a numerical scale value as most GIS-export tools do (one 
example 
> between much others 
> 
<http://www.uismedia.de/mapview/beispiele/schlatterbach/index.html>).
> the reason is very simply demonstrated: show the identical map 
interface 
> with numerical scale on your laptop (~15") AND a video projector 
> (somthing around 4 meters digonal. but the numerical scale is the 
same 
> on both displays. cartographical nonsense. the foolish fact here 
is that 
> most GIS do display numerical scales in their interfaces without 
warning 
> about the errors here.
> 
> the same happens between different classical screens (at a lower 
level). 
> the reason are differences in pixel size on displays and the fact 
that 
> you CANNOT evaluate pixel size with client side scripting. the 
> consequence: you can only show a graphical scale unless you ask 
the user 
> to communicate a screen size in natural units. see 
> <http://tirolatlas.uibk.ac.at/maps/thematic/index.html?
lang=it&menu=36>, 
> long load time, IE only. on the left you have "scale" 
and "optioni". go 
> on "optioni" and enter different visible screen widths (change 
again 
> with "all'ampiezza dello schermo"). you will see a nummerical 
scale 
> appear in the graphcial scale bar and that only slight width 
changes 
> have big consequences in  nummerical scale.
> 
> andr�
> 
> 
> 
> 
> 
> 
> 
> 
> kbatchu schrieb:
> > Andre,
> > 
> > Thanks for your reply. That answers my question about the 
> > relationship between 'viewbox' attributes and 'scale'. What 
would be 
> > the steps (using CurrentScale/Translate) to zoom in to the 
selected 
> > property extent and display the corresponding scale?
> > 
> > Thanks
> > Kiran
> > 
> > --- In [EMAIL PROTECTED], "Andr� M. Winter" 
> > <[EMAIL PROTECTED]> wrote:
> > 
> >>hi,
> >>
> >>scale doesn't change after viewBox changes because the scale is 
> >>reinitated on viewBox updated. thus it stays or reverts to 1.
> >>
> >>don't mix viewBox handling and currentScale/Translate. both have 
> > 
> > their 
> > 
> >>advantages but switching results in undesired results as you 
have 
> > 
> > seen.
> > 
> >>andr�
> >>
> >>
> >>
> >>>Hello all,
> >>>
> >>>I am using SVG to create a mapping application. I have a 
dropdown 
> >>>list of some properties within a city. When a user clicks on 
any 
> > 
> > one 
> > 
> >>>from this list, the map zooms to that particular property. To 
> > 
> > zoom 
> > 
> >>>to that property and fit it entirely in the viewport, the only 
> > 
> > thing 
> > 
> >>>I do is set the viewbox attributes (x,y,width,height) equal to 
> > 
> > the 
> > 
> >>>extent of that property. This works fine but my problem lies 
> >>>with 'scale'. After the property is displayed, I also would 
like 
> > 
> > to 
> > 
> >>>display the 'scale' at which it is being displayed. But when i 
> > 
> > try 
> > 
> >>>to read the scale (after zooming), the scale still shows the 
> >>>original scale (before zooming). Why is the 'scale' not being 
> >>>changed ? Doesnt changing the 'viewbox' attributes 
automatically 
> >>>change the scale? How do i find the 'current' scale after the 
> >>>property is zoomed in?
> >>>
> >>>Thanks for your help,
> >>>Kiran
> >>>
> > 
> > 
> > 
> > 
> > 
> > -----
> > To unsubscribe send a message to: svg-developers-
[EMAIL PROTECTED]
> > -or-
> > visit http://groups.yahoo.com/group/svg-developers and 
click "edit my membership"
> > ---- 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> 
> -- 
> ___________________________________________________________________
>         _________
>       _/         \____       _______
>     _/   ___-----___  \_____/     _ \
>    /   _/    \|/    \_       \_,+' \ \
>   /   /  _\|      |/_ \               |
> |  ,-----------------------------------------              � � �
> |==THERE'SSOMANYDIFFERENTWORLDSSOMANYDIFFERENTSUN================
> |==SANDWEHAVEJUSTONEWORLDBUTWELIVEINDIFFERENTONES================
> |  '-----------------------------------------              � � �
>   \   \_ -/|      |\-_/       _       |
>    \_   \___ /|\ ___/  _____ / '+,_/ /
>      \_     ----- ____/     \_______/
>        \_________/
> 
> 
> andre m. winter                             <http://www.carto.net/>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to