AW: [UMN_MAPSERVER-USERS] points variable substitution

Arnd Wippermann arndw at WTAL.DE
Mon Mar 19 14:22:10 EDT 2007


Hello David,
 
via cgi you have also this way
 
&map_credits_feature=new
&map_credits_feature_points=2572146+5669256
&map_credits_feature_text=0566

&map_credits2_feature=new
&map_credits2_feature_points=10+588
&map_credits2_feature_text=yourText
&map_credits2_class_color=255+0+255

with this layers in the mapfile

#&map_credits_feature=new&map_credits_feature_points=2605395+5705380&map_cre
dits_feature_text=Hallo
LAYER
  NAME credits
  STATUS on
  TYPE ANNOTATION
  FEATURE
    #POINTS 104 396 END
    #TEXT '© GINFO'
  END
  CLASS
    COLOR 0 0 255
    OUTLINECOLOR 255 0 0
    SYMBOL 'circle'
    SIZE 10
    LABEL
      TYPE TRUETYPE
      FONT VERDANA
      SIZE 14
      #ANTIALIAS
      COLOR 0 0 0
      POSITION UR
      FORCE true
    END
  END
END

LAYER
  NAME credits2
  STATUS on
  TRANSFORM FALSE
  TYPE ANNOTATION
  FEATURE
    #POINTS 10 530 END
    #TEXT 'aa'
  END
  CLASS
    #OUTLINECOLOR 255 0 0
    COLOR 255 0 0
    SYMBOL 'Struktur'
    SIZE 9
    LABEL
      TYPE TRUETYPE
      FONT VERDANA
      SIZE 12
      #ANTIALIAS
      COLOR 0 0 0
      POSITION CR
      FORCE true
    END
  END
END

The difference between the first and second layer is the TRANSFORM
parameter. The credits text and circle will set at the defined coordinate,
the credits2 text and circle will drawn in the bottom left corner.


Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/




________________________________

Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im
Auftrag von Shorthouse, David
Gesendet: Samstag, 17. März 2007 08:18
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] points variable substitution



Should have done a bit more thinking and reading. A dummy OGR Connection
does the trick:

 

    CONNECTIONTYPE OGR

    CONNECTION '<OGRVRTDataSource>

                        <OGRVRTLayer name="Whatever">

 
<SrcDataSource>ODBC:Whatever/whatever at whatever</SrcDataSource>

                                    <SrcSQL>SELECT %lng% as Longitude, %lat%
as Latitude</SrcSQL>

                                    <GeometryType>wkbPoint</GeometryType>

                                    <LayerSRS>WGS84</LayerSRS>

                                    <GeometryField
encoding="PointFromColumns" x="Longitude" y="Latitude"/>

                        </OGRVRTLayer>

                        </OGRVRTDataSource>'

 

David P. Shorthouse

------------------------------------------------------

Department of Biological Sciences

CW-403, Biological Sciences Centre

University of Alberta

Edmonton, AB   T6G 2E9

mailto:dps1 at ualberta.ca <mailto:dps1 at ualberta.ca> 

http://canadianarachnology.webhop.net
<http://canadianarachnology.webhop.net> 

http://arachnidforum.webhop.net <http://arachnidforum.webhop.net> 

http://www.spiderwebwatch.org <http://www.spiderwebwatch.org/> 
------------------------------------------------------

 

From: Shorthouse, David [mailto:dps1 at ualberta.ca] 
Sent: Saturday, March 17, 2007 1:06 AM
To: 'mapserver-users at lists.umn.edu'
Subject: points variable substitution

 

I am wanting to plot one point as provided by a cgi query parameter for a
very simple application, but substituting something like POINTS -113 45 END
with POINTS %lng% %lat% END doesn’t work like I thought it would. Any
suggestions for how to pass a point via URL parameters (e.g.
&lng=-113&lat=45) & have it appear on a resultant map?

 

Thanks,

 

David P. Shorthouse

------------------------------------------------------

Department of Biological Sciences

CW-403, Biological Sciences Centre

University of Alberta

Edmonton, AB   T6G 2E9

mailto:dps1 at ualberta.ca

http://canadianarachnology.webhop.net

http://arachnidforum.webhop.net

http://www.spiderwebwatch.org <http://www.spiderwebwatch.org/> 
------------------------------------------------------

 



More information about the mapserver-users mailing list