Map Filters

Randy How rhow at I3.COM
Fri Aug 25 13:30:43 EDT 2006


Steve,

That seems to work better.  Would that explain inconsistency?

So, in general, be aware of reserved characters and replace them with escape
sequences.

I'll implement this and test it some more, and if it truly works I owe you
my sanity.

Thanks, Randy


-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at dnr.state.mn.us] 
Sent: Friday, August 25, 2006 10:39 AM
To: Randy How
Subject: RE: [UMN_MAPSERVER-USERS] Map Filters

An = in a URL is a reserved character (as is a space) so you need to replace
those with escape sequences. Here's a page that seems to explain things
well.


  http://www.blooberry.com/indexdot/html/topics/urlencoding.htm 

Look at the reserved characters section. In short, your URL should read (I
think):

http://development-1/development/webapplication/datadoors_1/MapServer2/mapse
rv.exe?map=C:\Inetpub\wwwroot\development\webapplication\datadoors_1\ms_data
\product_coverage.map&mode=browse&mapext=-128.10565%2022.73085%20-63.60935%2
050.65215&map_product_filter=product_id%3D1

I could do WebEx late in the day if necessary.

Steve

>>> "Randy How" <rhow at i3.com> 8/25/2006 11:13:18 AM >>>
 
Steve, Thank for the reply,

Good question, and to continue  the silliness, I'm not sure what properly
escaping the URL means.  What's the proper escape character "/" or "'".

Adding the layer filter into the map file (good idea) and removing it in the
URL, yes that worked as expected.

I'm just very confused about this.  I'm getting very inconsistent results,
different ways I'm attempting this.  I'm been struggling with this since I'm
moved from MapServer 4.7.

I'm wondering if I can setup WebEx with you to show you the behavior and
discuss this with you, and start the resolution process with this issue.
It's driving me crazy.  Please let me know if this is possible and when a
good time to setup a WebEx.

Thank you, Randy




-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
Behalf Of Steve Lime
Sent: Friday, August 25, 2006 9:17 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Map Filters

In your second example (doesn't work), I'll ask a silly question. Are you
properly escaping the url- like the = in your filter? 

One other idea, what happens if you put that filter in the mapfile instead
of passing it?

Steve

>>> Randy How <rhow at I3.COM> 8/24/2006 7:46:29 PM >>>
Greetings,
 
I've been having unpredictable luck generating a map from MapServer
4.9
using "map filters" in the query string.  I don't get an error, there's no
image produced or filename in the response.

Is there something wrong in the layer definition?
Is there something about the URL, specifically the syntax of the map filter
parameter?

Layer in Mapfile
LAYER
 NAME "product"
 CONNECTIONTYPE postgis
 CONNECTION "user=uuuu password=xxxx dbname=ddddd host=m.m.m.m"
 DATA "geometry from coverage"
 STATUS DEFAULT
 TYPE POLYGON
 
 PROJECTION
  "init=epsg:4326"
 END

 CLASS 
    OUTLINECOLOR 255 0 0 
    SYMBOL 1
    SIZE 3
    
    LABEL
      TYPE bitmap
      SIZE large
      POSITION cc
      COLOR 0 153 0
    END
 END
 
END
 
Works
http://development-1/development/webapplication/datadoors_1/MapServer2/mapse


rv.exe?
map=C:\Inetpub\wwwroot\development\webapplication\datadoors_1\ms_data\produc
t_coverage.map&
mode=browse&mapext=-128.10565 22.73085 -63.60935 50.65215

Does not work
http://development-1/development/webapplication/datadoors_1/MapServer2/mapse


rv.exe?
map=C:\Inetpub\wwwroot\development\webapplication\datadoors_1\ms_data\produc
t_coverage.map&
mode=browse&mapext=-128.10565 22.73085 -63.60935 50.65215&
map_product_filter=product_id=1


Thanks
________________________________________________
Randy How 

Geospatial Applications Developer
Rhow [at] i3.com 



More information about the mapserver-users mailing list