[mapserver-users] insert png image in svg output

valerio vianello valerio.vianello at yahoo.it
Tue Jun 3 01:53:15 EDT 2008


Hi,

so there is no way to have in output an svg file with all the layer ? because if I understood Mapserver don't support svg file in input and according to the svg spec a png file is only linked by a svg file.

Regard to the map rendering I use Firefox and if I open the svg file with firefox it works fine. The problem is the html template linked to the map. probably the issue is in the code that I use to visualize the tmp image. 
  
<td>
          <!-- THE INTERACTIVE, DYNAMICALLY CREATED MAP -->
          <input type="image" name="img" src="[img]"
                    width="600" height="400">
 </td>

Do you know what is the correct code that I have to insert in the template to visualize the svg file ?

thanks 
Valerio.

--- Lun 2/6/08, Barend Kobben <kobben at itc.nl> ha scritto:
Da: Barend Kobben <kobben at itc.nl>
Oggetto: Re: [mapserver-users] insert png image in svg output
A: valerio.vianello at yahoo.it, guillaume.sueur at neogeo-online.net
Cc: mapserver-users at lists.osgeo.org
Data: Lunedì 2 giugno 2008, 16:28

HI, 

Putting a png raster as a xlink inside svg is the correct way according to
the SVG spec. 

If I understand correctly, the SVG opens fine from the tmp dir when opened
locally, but not when pointing a browser there using http://...? Could it be
a permissions problem on the file (or more likely the tmp dir) in other
words, is the Web server allowed to serve the path mentioned in your href
(/ms4w/tmp/ms_tmp/4843c233_6948_1.png), and does it have anonymous read
rights, so the browser can pickj it up and show it..?

Also, what SVG user agent do you use: FireFox, Opera, IE with a plugin,
or...? 


-- 
Barend Köbben
International Institute for Geo-Information
Sciences and Earth Observation (ITC)
PO Box 6
7500AA Enschede, The Netherlands
+31 (0)53 4874253




On 02-06-08 15:34, "valerio vianello"
<valerio.vianello at yahoo.it> wrote:

> If I open directly the svg file from the tmp directory it's
work...while when
> I open the map file there is some problme with the templete, maybe as you
said
> before in the IMG tag.
> 
> But the problem is that I would in output only the svg file and not a svg
file
> with a link to a png image.
> 
> any suggestion ?
> 
> thanks Valerio
> 
> --- Lun 2/6/08, Guillaume Sueur
<guillaume.sueur at neogeo-online.net> ha
> scritto:
> Da: Guillaume Sueur <guillaume.sueur at neogeo-online.net>
> Oggetto: Re: [mapserver-users] insert png image in svg output
> A: valerio.vianello at yahoo.it
> Cc: mapserver-users at lists.osgeo.org
> Data: Lunedì 2 giugno 2008, 13:04
> 
> actually, it's getting a bit clearer now.
> what happens when you try to open the svg file in your web browser ?
> 
> Guillaume
> 
> valerio vianello a écrit :
> > Hi,
> > 
> > I need that Mapserver give me an image in svg format. I tried to
follow
> > the instruction in
> "http://mapserver.gis.umn.edu/docs/howto/svg-howto"
> > but I still have some problems. My map file is composed by two
layers: a
> > raster layer (a png file) a polygon layer. I set in the map the
output
> > format as svg and I have put in the file this code :
> > OUTPUTFORMAT
> >     NAME svg
> >     DRIVER "svg"
> >     MIMETYPE "image/svg+xml"
> >     IMAGEMODE PC256
> >     EXTENSION "svg"
> >  END
> > 
> > In the Mapserver tmp directory there is two file. One file in png
format
> > with the raster layer and one file in svg format with the polygon
layer
> > and a link to the png file.
> > 
> > There is a way to insert a real picture in the svg file in place
of the
> > link ?
> > 
> > The following is the code in the svg file.
> > 
> > <?xml version="1.0"
encoding="UTF-8"?>
> > <svg version="1.1" width="600"
> height="400" 
> > xmlns="http://www.w3.org/2000/svg"
> > xmlns:xlink="http://www.w3.org/1999/xlink">
> > 
> > <!-- START LAYER background -->
> > 
> > <image
xlink:href="/ms4w/tmp/ms_tmp/4843c233_6948_1.png"
> x="0" y="0" 
> > width="600" height="400"/>
> > 
> > <!-- START LAYER floors -->
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 8 28 L
> > 485 35 L 591 129 L 592 161 L 283 162 L 287 364 L 2 364 L 5 29 L 8
28
> z"/>
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 240 241 L
> > 285 241 L 285 364 L 146 363 L 149 322 L 240 241 z"/>
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 3 242 L
> > 56 242 L 130 323 L 130 363 L 5 365 L 4 246 L 3 242
z"/>
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 5 30 L
> > 173 31 L 197 40 L 279 126 L 280 137 L 7 138 L 5 30
z"/>
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 293 38 L
> > 338 40 L 416 120 L 417 161 L 289 159 L 293 38 z"/>
> > <path stroke="#202020"
stroke-width="1"
> style="fill:none" d="M 436 41 L
> > 482 40 L 557 118 L 558 160 L 434 157 L 436 41 z"/>
> > <path stroke="#ffff00"
stroke-width="1"
> style="fill:none" d="M 11 138 L
> > 281 136 L 283 239 L 241 239 L 161 320 L 130 319 L 55 244 L 9 244
L 8 223
> > L 11 138 z"/>
> > <text x="115" y="234"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
text-anchor="end">s.X</text>
> > <text x="466" y="106"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
text-anchor="end">s.F</text>
> > <text x="323" y="106"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
text-anchor="end">s.E</text>
> > <text x="50" y="90"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
> text-anchor="end">s.canteen</text>
> > <text x="35" y="310"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
text-anchor="end">s.B</text>
> > <text x="185" y="308"
> font-family="arial-bold" font-size="12pt"
> > fill="#841f1f"
text-anchor="end">s.A</text>
> > </svg>
> > 
> > Any suggestion
> > 
> > thanks valerio
> > 
> > 
> >
------------------------------------------------------------------------
> > Scopri il Blog di Yahoo! Mail
> >
>
<http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3
> A%2F%2Fwww.ymailblogit.com%2Fblog%2F>:
> 
> > trucchi, novità, consigli... e la tua opinione!
> > 
> > 
> >
------------------------------------------------------------------------
> > 
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> --
> 
> 
>       ___________________________________
> Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua
opinione!
> http://www.ymailblogit.com/blog/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

International Institute for Geo-Information Science and Earth Observation (ITC)
Chamber of Commerce: 410 27 560

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the
addressee only. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution or action in relation to the content
of this information is strictly prohibited. If you have received this e-mail by
mistake, please delete the message and any attachment and inform the sender by
return e-mail. ITC accepts no liability for any error or omission in the
message content or for damage of any kind that may arise as a result of e-mail
transmission.


      ___________________________________ 
Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!
http://www.ymailblogit.com/blog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080603/e62cee56/attachment-0001.html


More information about the mapserver-users mailing list