[MS4W-Users] Σχετ: svg symbols
jim lepipas
cavelep at yahoo.gr
Wed Mar 2 11:32:05 EST 2016
Dear Jeff,
I have read the ticket. I see that there is a problem with svg symbols. But the problem I am facing is
that I do not know how to build these libraries (libsvg, libsvg-cairo) in ms4w. In the ticket I do not find any related instructions "building libsvg and libsvg-cairo in the MS4W 3.1.0 build environment compiles MapServer successfully".
How may I build these libraries in ms4w in order to further test rendering and see if the mapserv.exe crashes?
My version is 3.1.2, my map file has this layer:
LAYER CONNECTIONTYPE postgis NAME "seamarks_points" # Connect to a remote spatial database CONNECTION "user=postgres dbname=openseamap host=localhost password=metricos1979 port=5432" PROCESSING "CLOSE_CONNECTION=DEFER" # Get the lines from the 'geom' column of the 'roads' table DATA "way from planet_osm_point using srid=900913 using unique osm_id" STATUS ON TYPE POINT TOLERANCE 6 TOLERANCEUNITS pixels CLASS Name 'seamarks_points' #COLOR 0 130 250 #OUTLINECOLOR 0 130 250 SYMBOL 'light' SIZE 50 END # ClassEND
I have (in the .mpa file) this symbol definition
SYMBOL NAME "light" TYPE svg IMAGE "P1.major.svg"END
and the P1.major.svg file is in the same folder with the .mpa file
I get the error:
Warning: classObj::createLegendIcon(): [MapServer Error]: preloadSymbol(): SVG symbol support is not enabled. in C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php on line 544
Fatal error: Uncaught exception 'MapScriptException' in C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php:544 Stack trace: #0 C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php(544): classObj->createLegendIcon('18', '14') #1 C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php(403): Init_map->createLegendList() #2 C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php(69): Init_map->_initLegend() #3 C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\init.php(34): Init_map->initAllParameters() #4 C:\ms4w\Apache\htdocs\sapi\gis\map_default.phtml(48): include_once('C:\\ms4w\\Apache\\...') #5 {main} thrown in C:\ms4w\Apache\htdocs\sapi\gis\incphp\init\initmap.php on line 544
That means that I have to enable SVG symbol support.
Please advice
best regards,Dimitris
Στις 4:37 μ.μ. Τετάρτη, 2 Μαρτίου 2016, ο/η Jeff McKenna via MS4W-Users <ms4w-users at lists.ms4w.com> έγραψε:
Hi Dimitrios,
First I am glad that your architecture is working great with MS4W
(Windows, PostgreSQL/PostGIS, OSM, MapServer). A lot of work goes into
making that all happen. Thanks for this positive feedback.
Regarding SVG symbols with MS4W, there is currently a build issue with
that (see the ticket at http://ms4w.com/trac/ticket/3). This will be a
significant effort, to debug and build. However if your organization
can help fund these changes in MS4W for the entire community, that would
be a big help, so please contact me directly if you can assist.
At the moment, this is planned for the MS4W 4.0 release, and you can
follow along with that in the ticket and provide testing feedback there
(you can also see release dates through that issue tracker as well).
But to be honest, having funding to dive into this would help make this
a priority sooner.
Thanks again for your positive feedback, I am glad that MS4W is working
so well in your environment.
Talk soon,
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 2016-03-02 10:27 AM, jim lepipas via MS4W-Users wrote:
> Hello everyone,
>
> I have installed ms4w in a windows machine. I use a postgresql db with
> postgis extension enabled in which I have imported osm
>
> data with osm2pgsql command line tool. Finally I use the p.mapper
> framework (unzip and copy in apache/htdocs folder) for
>
> displaying data from db to the browser. Everything works ok.
>
> Then I tried to style my map. I want to use symbols of svg type (
> http://mapserver.org/mapfile/symbol.html ).
>
> In the link mentioned above I read that svg symbols require the
> libsvg-cairo library.
>
> Is there a tutorial on how to accomplish this?
>
> Does exist an ms4w distribution with this library recompiled?
>
> I want some instructions on how to use svg symbols for styling my map.
>
> In this link http://cairographics.org/download/ in the windows section
> I followed this http://gladewin32.sourceforge.net/ link
>
> then downloaded Gtk+ 2.12.9 Development Environment Revision 2
> <http://downloads.sourceforge.net/gladewin32/gtk-dev-2.12.9-win32-2.exe> (17,172KB)
> and run the installer. Do I have to copy .dll and paste them in
>
> ms4w folder (and where exactly)? Do I have to add something to the path
> variable?
>
> Thanks in advance
>
> best regards,
> Dimitrios
>
>
>
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.ms4w.com
http://lists.ms4w.com/mailman/listinfo/ms4w-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/mailman/private/ms4w-users/attachments/20160302/3aff5ca2/attachment.html>
More information about the MS4W-Users
mailing list