Loading ...
Sorry, an error occurred while loading the content.

Re: fixed dimension

Expand Messages
  • antonio
    Hy Ellen, yes, your map strictly coincide with the one I would like to produce. I see the script, but I do not be able to adapt to my svg file... this is the
    Message 1 of 3 , May 27, 2004
    • 0 Attachment
      Hy Ellen,

      yes, your map strictly coincide with the one I would like to produce.
      I see the script, but I do not be able to adapt to my svg file...

      this is the code changed with your script:

      <?xml version="1.0" encoding="iso-8859-1"?>
      <?xml-stylesheet href="./data/style.css" type="text/css"?>
      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
      "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
      <!ENTITY water "fill:#ccccff;fill-opacity:1;stroke-
      width:100;">
      <!ENTITY gardensites "fill:#ff99ff;fill-
      opacity:0.75;stroke:#000000;stroke-opacity:1;stroke-width:400;">
      ]>
      <svg width="848" height="640" viewBox="-761344.10 -261200.00
      7566688.20 5746400.00" onmousemove="showCoords(evt)" onzoom="onzoom
      (evt)" onscroll="scrolling()">
      <script type="text/ecmascript"><![CDATA[function onzoom(evt)
      {
      var directTarget = evt.getTarget();
      var svgDocument;
      if( directTarget.getNodeType() != 9 ) // if not DOCUMENT_NODE
      svgDocument = directTarget.getOwnerDocument();
      else
      svgDocument = directTarget;
      var svgrootElement = svgDocument.rootElement;
      var scale = svgrootElement.getCurrentScale() ;
      var newRadius = 1800/scale;
      var theSites = svgrootElement.getElementById
      ('t0100');
      for (i = 0; i < theSites.childNodes.length; i++) {
      if (theSites.childNodes.item(i).nodeName
      == "circle") {
      indSite = theSites.childNodes.item(i)
      indSite.setAttribute("r",newRadius);
      theStyle = indSite.getStyle();
      theStyle.setProperty('stroke-width',
      (400/scale));
      }
      }
      }]]></script>
      <desc>Antarctic rocks MNA , SVG map generated from ArcView by
      SVGMapper 2.3</desc>
      <defs>
      <script xlink:href="./data/data.js" type="text/javascript">
      </script>
      </defs>
      <rect id="mapextent" x="0.00" y="0.00" width="6044000.00"
      height="5224000.00" style="fill:white "/>
      <g id="0" style="opacity:0.7">
      <image id="RAMP Radarsat" x="0.00" y="0.00" width="6044000.00"
      height="5224000.00" xlink:href="./data/image0.png"/>
      </g>
      <g id="1"> <!--Volcanic rock samples-->
      <g id="t0100"> <!--Volcanic
      rock samples-->
      <a xlink:href="javascript:NewWin('i_01_0')"><circle id="i_01_0"
      style="&gardensites;" onmouseover="Triple('i_01_0','basalt')"
      onmouseout="Out('i_01_0')" cx="3644907.42" cy="4073938.82"
      r="33461.18"/></a>
      <a xlink:href="javascript:NewWin('i_01_1')"><circle id="i_01_1"
      style="&gardensites;" onmouseover="Triple('i_01_1','basalt')"
      onmouseout="Out('i_01_1')" cx="3640906.53" cy="4076104.57"
      r="33461.18"/></a>
      </g>
      </g>
      </svg>


      where is the mistake?
      you can check at
      http://www.mna.it/italiano/back/svg_test/svgmap_circle/map.htm

      antonio

      and thanks....
    Your message has been successfully submitted and would be delivered to recipients shortly.