hi Jeroen

the main differences are:

1) when you set zoom&pan with the viewBox, you have to forbid zoomAndPan 
through the viewer's functionality (ctrl+something for ASV and 
Squiggle). as a cartographer this is the biggest drawback. it is 
possible to rebuild this functionality, but this is hardcore and may 
only be helpful when having a mapserver behind that delivers SVG
3) with the viewBox-method your interface is scalable. that may be 
useful, but i think it is generally not (readability, etc).
2) the viewBox-method rather fits for maps where a large part of your 
screen are devoted to the interface, whereas currentScale/Translate is 
better for applications with small interfaces and a bigger part for the 
map itself.

andré


-- 
___________________________________________________________________
andre m. winter,
  cartography for internet and multimedia applications
  schiessstand 4/1, a6091 goetzens, tyrol, austria
  tel.: ++43.5234.32732
  email: <[EMAIL PROTECTED]>

<http://www.vectoreal.com/>          SVG consulting and development
<http://www.carto.net/>          online cartography focusing on SVG
<http://www.carto.at/>     print and online touristic map solutions 




Jeroen Vanattenhoven wrote:
> Andre M. Winter - Carto.net schreef:
>
> First of all, thanks for the elaborate answer.
>
>   
>> hi Jeroen,
>>
>>  
>>
>>     
>>> Zoom & Pan operations on SVG maps are quite common. Mostly those 
>>> operations are implemented changing the viewBox attributes. 
>>>    
>>>
>>>       
>> the problem is that viewBox manipulations are incompatible with 
>> currentScale/Translate because on every setting of new viewBox values 
>> currentScale/Translate gets set to 1,0,0 whatever they may have been set 
>> before. you should never mix those two methods, unless you know exactly 
>> what you do (btw i never saw an example doing that and this may be a 
>> stong enough argument...)
>>
>>  
>>
>>     
> I see. The question I was actually posing was if the 
> currentScale/Translate method would be easier then the viewBox method 
> for maps inside user interfaces. Since currentScale/Translate only work 
> on the outmost svg element, the viewBox method seems more appropiate.
>
>   
>> no, that cannot work because currentScale/Translate always act on (or 
>> represent the state of) the outermost svg, the root element. the way to 
>> go is to have your main content zoomed as ever you want and apply 
>> inverse transformations (for <g>s) or inverse screenCTMs (for inner 
>> <svg>s) to the parts that are acting as "fixed" interface containers.
>>  
>>
>>     
> hehe, I'm actually belgian, but followed a german course the last two 
> years, so it will probably be ok :).
>
>   
>> because it is tricky. there are samples out there but these are not easy 
>> to break down in a 5-lines sample script. all this is explained in book 
>> coming out feb 2006, but it will be in german first (but you should be 
>> able to read it, judging based on your last name...) here is a short 
>> description <http://www.huethig.de/shop/product.html?id=146899&top=1>, 
>> the companion website will go online jan 2006 at <http://svg.carto.net/> 
>> (may be offline these times).
>>
>>     
> Could you comment on what you think is the most appropiate/easy way to 
> provide zoom & pan for maps in SVG? I only have experience with the 
> viewBox method.
>
> Jeroen
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
>
>
>
> -----
> 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
>
>
>
>  
>
>
>   




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/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