MapServer / MapServer-import

3 stars 2 forks source link

Cannot query with Mozilla #821

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: b.veldkamp@zonnet.nl Date: 2004/08/17 - 14:58

When I submit a query with Mozilla (i.e.
http://dsc586-3/vloop/cgi-bin/mapserv?imgxy=250+150&mapxy=0+0&map=..%2Fpag%2Fvloop.map&imgext=172329.357920+438926.688000+196177.642080+453219.312000&layer=route&layer=bkgrnd&minx=171383&miny=440588&maxx=200227&maxy=459599&img.x=94&img.y=239&mode=query&zoom=1&mapext=172329.357920+438926.688000+196177.642080+453219.312000),
MS gives me this error message:
mapserv(): Web application error. Query mode needs a point, imgxy and mapxy are
not set. 
As can be seen, both imgxy and mapxy are set. 

It toyed around a bit, comparing the url generated by Internet Explorer to the
one generated by Mozilla, and it seems that if the parameters img.x and img.y
are not at the end of the url, mapserv chokes.

Mozilla=1.6
Internet Explorer=6.0 SP1
Windows=XP Professional SP1

Berend
tbonfort commented 12 years ago

Author: sdlime Date: 2004/08/19 - 17:57

Do you have a live site I can see this happen?

Steve
tbonfort commented 12 years ago

Author: b.veldkamp@zonnet.nl Date: 2004/08/19 - 23:39

yes:
http://www.webmap.nl/veluweloop/cgi-bin/mapserv?imgxy=250+150&mapxy=0+0&map=..%2Fpag%2Fvloop.map&imgext=172329.357920+438926.688000+196177.642080+453219.312000&layer=route&layer=bkgrnd&minx=171383&miny=440588&maxx=200227&maxy=459599&img.x=94&img.y=239&mode=query&zoom=1&mapext=172329.357920+438926.688000+196177.642080+453219.312000
gives an error, while
http://www.webmap.nl/veluweloop/cgi-bin/mapserv?imgxy=250+150&mapxy=0+0&map=..%2Fpag%2Fvloop.map&imgext=172329.357920+438926.688000+196177.642080+453219.312000&layer=route&layer=bkgrnd&minx=171383&miny=440588&maxx=200227&maxy=459599&mode=query&zoom=1&mapext=172329.357920+438926.688000+196177.642080+453219.312000&img.x=94&img.y=239
works properly, the only difference isthe position of img.x and img.y.

Note: you can replace mapserv by mapserv.pl, this is a perl wrapper around
mapserv, which puts img.x and img.y at the end of QUERY_STRING. The site itself
uses this script, so right now the only way to test, is to manually type in the url.

Berend
tbonfort commented 12 years ago

Author: sdlime Date: 2004/08/20 - 00:09

Why are you setting mapxy? If you remove it does it still matter where img.x 
and img.y are in the URL. Typcially you don't set both. There is logic in the 
form var processing that gives precedence to different ways of eventually 
defining an extent. I imagine that's what we're bumping into here.

Steve
tbonfort commented 12 years ago

Author: b.veldkamp@zonnet.nl Date: 2004/08/20 - 00:35

mapxy may be some relic from a previous version, but removing it makes no
difference (neither does removing imgxy)

http://www.webmap.nl/veluweloop/cgi-bin/mapserv?imgxy=250+150&map=..%2Fpag%2Fvloop.map&imgext=172329.357920+438926.688000+196177.642080+453219.312000&layer=route&layer=bkgrnd&minx=171383&miny=440588&maxx=200227&maxy=459599&img.x=94&img.y=239&mode=query&zoom=1&mapext=172329.357920+438926.688000+196177.642080+453219.312000
Error

http://www.webmap.nl/veluweloop/cgi-bin/mapserv?imgxy=250+150&map=..%2Fpag%2Fvloop.map&imgext=172329.357920+438926.688000+196177.642080+453219.312000&layer=route&layer=bkgrnd&minx=171383&miny=440588&maxx=200227&maxy=459599&mode=query&zoom=1&mapext=172329.357920+438926.688000+196177.642080+453219.312000&img.x=94&img.y=239
OK
tbonfort commented 12 years ago

Author: b.veldkamp@zonnet.nl Date: 2005/08/22 - 12:03

Any news on this one? This is still a problem in version 4.6.
tbonfort commented 12 years ago

Author: sdlime Date: 2005/08/22 - 16:19

Opps, sorry. I've let too much slide recently. Why is there both mapext and 
imgext? Should really only have one or the other. A plain old point query needs:

  - mapxy (the point) OR
  - imgext and imgxy (with optional image size, defaults to what's in the 
mapfile)

If you mix and match those parameters strange things may happen based on which 
parameters are processed first.

Steve
tbonfort commented 12 years ago

Author: b.veldkamp@zonnet.nl Date: 2005/08/24 - 08:55

I'm a bit confused right now... I thought MS needed imgext to calculate a new
extent when zooming in/out. I use mapext in a <select> element with a list of
predefined extents.
Furthermore, the mapimage is an <INPUT type=image> with name img, so I also have
img.x and img.y, when I click on the map. Does that mean I can leave out imgxy?
tbonfort commented 12 years ago

Author: sdlime Date: 2005/09/01 - 18:40

Problem was related to how the parameters are being passed in combination 
rather than being a bug per se. More a documentation issue.

Steve