[mapserver-users] Postgis and Mapserver

Hans Castorp hanscastorp76 at yahoo.es
Wed Apr 16 12:48:18 EDT 2008


Hi to all,

 

In the past days I have been answering some questions about it but, by now,
I haven’t achieved my goal. I will try to explain what I have and what I
want (need, in fact):

 

I’m displaying some cartography: lines and polygons from shape files and
points from a Postgis table (without filtering).

At the same time, I have a form to query the postgis table applying some
filters. I am making these queries using PHP and SQL in the usual way. I
don’t use mapscript queryByAttibutes, because SQL queries are more flexible
and powerful (I think). Due to these facts what I have is: on one side, a
map showing all the points (with no filter) and, on the other side, a
filtered list of these same points.

 

What I’m looking to do is:

 

-          Zoom to all my selection, changing simbology in order to show
some points with the default simbology (map file) and others (the result of
my selection) with a special simbology.

-          Zoom to one chosen point in my selection. By now, I’m doing it
using zoomToExtents, passing as parameters x and y of the point (retrieved
in the sql query). This works fine but I need to change the simbology of the
selected point in order to make it clearly visible between the others.

 

What I’m trying in order to change simbology for selected points is
something like this:

 

$oMap = ms_newMapObj($szMapFile);

            

            $oLayer = $oMap->getLayerByName("EMPRESAS");

            

            $oClass = $oLayer->getClass(0);

            

            $oEstilo = $oClass->getStyle(0);

            

            $oLayer->setFilter($sql);

            

            $oEstilo->set("symbolname", "MARKER_EMPRESA_ALT");

 

But I have no results (at least no errors, too :-))

 

Some help will be welcomed.

Thanks in advance to everyone.

 

 

 

 

Hans Castorp

 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.0/1379 - Release Date: 15/04/2008
18:10
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080416/18f5a646/attachment.html


More information about the mapserver-users mailing list