Jan,

I've pointed you to the map navigation tutorial 
(http://www.carto.net/papers/svg/
navigationTools/) where exactly your case is explained. Please read it 
carefully to have 
your question answered. In case the tutorial is unclear or missing some bits, 
please tell me 
where I can improve it.

As to the coordinate system within the viewBox:
you should use the coordinate system your GIS data is stored in. If you have 
meters as 
units than use directly those meters. If you have degrees than use these 
degrees, if you 
have hundredth's of degrees (your case) than that is the inner coordinate 
system within 
your viewBox. Let's assume you use a maximum map extent of 10 by 10 degrees 
with an 
offset of -120°W and 50°N, than your viewBox should be defined as "-120 -50 10 
10" to 
display all of your map data. If you reduce your viewBox in width or height or 
move the 
offset than you'll see just a portion of your data.

Please note the minus sign infront of your y coordinates. This is because SVG 
has an 
inverted y-axis if you compare it with a map coordinate system. As a result you 
should 
multiply all y-values with -1. Alternatively you could add a matrixTransform, 
but this has 
the disadvantage that it also inverts your text elements, if any.

Hope this helps,
if you have any suggestions on how I can improve the above tutorial, please let 
me know.

Andreas

--- In svg-developers@yahoogroups.com, "Jan" <[EMAIL PROTECTED]> wrote:
> 
> I have a map application that currently works.  It is written using 
> html, php, Javascript, and svg.  It has two embedded svg map elements 
> within the html separately.  Both maps are using the default viewbox 
> values as follows (I don't specifically set the viewbox):
> 
> Embedded SVG Map 1:
> <svg width='100%' height='100%'
> xmlns:xlink='http://www.w3.org/1999/xlink'
> xmlns:a3='http://ns.adobe.com/AdobeSVGViewerExtenxions/3.0/' 
> a3:scriptImplementation='Adobe'
>  onload='loadingFinished()'
>  zoomAndPan='disable'
>  onzoom='zoomEvent()' onscroll='zoomEvent()'>
> 
> Embedded SVG Map 2:
> <svg width='100%' height='100%'
> xmlns:xlink='http://www.w3.org/1999/xlink'
> xmlns:a3='http://ns.adobe.com/AdobeSVGViewerExtenxions/3.0/' 
> a3:scriptImplementation='Adobe'
>  onload='loadingFinished()'
>  zoomAndPan='disable'>
> 
> I am trying to re-do my app so that I only have svg embedded into the 
> html only once and have svg embedded within svg (one map within the 
> other).  In order to do this, I believe I have to set the viewboxes 
> appropriately for each, but I have no idea how to do this.  I've been 
> trying to change the viewbox value for Map 1, but cannot get it to 
> display to save my life.  This is what I have now:
> 
> <svg width='100%' height='100%'
>  viewBox="0 0 600 680" 
>  xmlns:xlink='http://www.w3.org/1999/xlink'
>  xmlns:a3='http://ns.adobe.com/AdobeSVGViewerExtenxions/3.0/' 
> a3:scriptImplementation='Adobe'
>  zoomAndPan='disable'
>  onload='loadingFinished()'>
> <rect x="0" y="0" width="600" height="680" stroke="none" 
> fill="aliceblue"/>
> <svg id="map1view" x="0" y="15" viewBox="0 0 600 680" width="600" 
> height="680" onzoom='zoomEvent()' onscroll='zoomEvent()'>
> <g transform='scale(0.012)' id='map'>
> .
> .
> .
> </g>
> </svg>
> </svg>
> 
> I thought I had to set the viewbox values somehow to correlate with 
> my map coordinates (I'm using hundredth's of degrees), but when I 
> tried that, it didn't work either and I feel like I'm just taking 
> wild guesses as to which values to use.  How do you do this?  What do 
> the x and y values of the viewbox correspond to?  I'm having a hard 
> time understanding how to set a viewbox and I've read some manuals 
> and other info with no luck.
> 
> With the code above, it looks like a very small portion of the map is 
> displaying within the window.
> 
> Please help!!
> 
> Jan





-----
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