[mapserver-users] problem with zoomRectangle
hello I am working on java-mapscript I have a problem with zoomRectangle: here it is rect_left: 377.000 rect_top: 120.000 rect_width: 52 rect_height: 36 rectObj rect_img=new rectObj(rect_left,500-(rect_top+rect_height), rect_left+rect_width,500-rect_top,0) ; // 500 map dimensions rect_img.toString() { 'minx': 377 , 'miny': 344 , 'maxx': 429 , 'maxy':380 } // for checking it looks ok map0.zoomRectangle(rect_img,500,500,map0.getExtent(),null); it gives: Caused by: java.lang.UnknownError: mapscript::mapObj::zoomRectangle(): General error message. image rectangle maxy = miny when I change the places of miny and maxy . it does not work again what is the wrong I am doing ? regards -- Ahmet Temiz Jeo. Müh. Afet İşleri Gen. Md.lüğü Deprem Ar. D. Ahmet Temiz Geo. Eng. General Dir. of Disaster Affairs TURKEY -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] problem with zoomRectangle
I use this code to build the zoomRectangle (note the 1 which allows for miny = maxy): return new rectObj( (getXAsDouble() getX2AsDouble() ) ? getXAsDouble() : getX2AsDouble(), (getYAsDouble() getY2AsDouble() ) ? getY2AsDouble() : getYAsDouble(), (getXAsDouble() getX2AsDouble() ) ? getX2AsDouble() : getXAsDouble(), (getYAsDouble() getY2AsDouble() ) ? getYAsDouble() : getY2AsDouble(), 1 // image coordinates, allow for miny = maxy ); where X,Y and X2,Y2 are class attributes. HTH, Umberto On Mon, May 4, 2009 at 11:32 AM, orkun te...@deprem.gov.tr wrote: hello I am working on java-mapscript I have a problem with zoomRectangle: here it is rect_left: 377.000 rect_top: 120.000 rect_width: 52 rect_height: 36 rectObj rect_img=new rectObj(rect_left,500-(rect_top+rect_height), rect_left+rect_width,500-rect_top,0) ; // 500 map dimensions rect_img.toString() { 'minx': 377 , 'miny': 344 , 'maxx': 429 , 'maxy':380 } // for checking it looks ok map0.zoomRectangle(rect_img,500,500,map0.getExtent(),null); it gives: Caused by: java.lang.UnknownError: mapscript::mapObj::zoomRectangle(): General error message. image rectangle maxy = miny when I change the places of miny and maxy . it does not work again what is the wrong I am doing ? regards -- Ahmet Temiz Jeo. Müh. Afet İşleri Gen. Md.lüğü Deprem Ar. D. Ahmet Temiz Geo. Eng. General Dir. of Disaster Affairs TURKEY -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ layers/ ol_countries_wms .mapSERVICE=WMSVERSION=1.3.0REQUEST=GetMapSTYLES=SRS=EPSG:4326 I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG:4326;' , {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUS ON UNITS DD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH ../geodata/ FONTSET ../geodata/fonts/fonts.lst SYMBOLSET ../trade.sym IMAGECOLOR 230 240 255 CONFIG MS_ERRORFILE /var/log/mserr.log DEBUG 5 PROJECTION init=epsg:4326 END WEB METADATA wms_title GMS Livestock Trade wms_onlineresource http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map; wms_srs EPSG:4326 END IMAGEPATH ../../tmp/ IMAGEURL../../tmp/ END LAYER METADATA wms_title Country Boundaries wms_srs EPSG:4326 wms_group_title Political END STATUS ON NAMEcountries GROUP Political DATAglobal/ctybnda TYPEpolygon OPACITY 100 CLASS NAMECountry Borders COLOR 240 240 180 OUTLINECOLOR 0 70 0 END END cheers Ben -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 b...@remoteinformation.com.au Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] GetFeatureInfo in XML
Hi all, I am currently experimenting with Web Map Services and a custom PHP wrapper. In this script for a GetFeatureInfo-Request with info_format=application/vnd.ogc.wms_xml or info_format=text/xml a XML document is generated. This works well, a XML-template is set in the mapfile dynamically: ... if($k == 'info_format' ($v == 'application/vnd.ogc.wms_xml' || $v == 'text/xml')){ $layer = $oMap-getLayerByName($layername); $layer-set(template, template/featureinfo_nsg.xml); ... } ... Two questions: 1. Is it possible to get a featureInfo-Request in xml native by mapserver (no gml) 2. How can I tell mapserver to enhance the list of capabilities to xml? At this time there comes only ... GetFeatureInfo Formattext/plain/Format Formattext/html/Format Formatapplication/vnd.ogc.gml/Format DCPType ... Thanks Sven ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
Hi, Do you have the full URL that is received by the server? MapServer WMS 1.3.0 supports the following EXCEPTIONS : XML, INIMAGE, or BLANK. Is might be possible to add EXCEPTIONS: XML (or INIMAGE, or BLANK) when building your OL wms 1.3.0 layer? Best Regards, Ben Madin wrote: G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSVERSION=1.3.0REQUEST=GetMapSTYLES=SRS=EPSG:4326 I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG:4326;', {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUSON UNITSDD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH ../geodata/ FONTSET ../geodata/fonts/fonts.lst SYMBOLSET ../trade.sym IMAGECOLOR 230 240 255 CONFIG MS_ERRORFILE /var/log/mserr.log DEBUG 5 PROJECTION init=epsg:4326 END WEB METADATA wms_title GMS Livestock Trade wms_onlineresource http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map; wms_srs EPSG:4326 END IMAGEPATH ../../tmp/ IMAGEURL../../tmp/ END LAYER METADATA wms_title Country Boundaries wms_srsEPSG:4326 wms_group_title Political END STATUSON NAMEcountries GROUPPolitical DATAglobal/ctybnda TYPEpolygon OPACITY 100 CLASS NAMECountry Borders COLOR240 240 180 OUTLINECOLOR 0 70 0 END END cheers Ben -- Assefa Yewondwossen Software Analyst Email: ass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: Dynamic data loading using Google maps andMapserver
Hi Steve, If I provide Mapserver with a point x,y in WGS84 projection (from google maps) as a query, can mapserver give me the enclosing polygon information (using point-in-polygon method or something else)? If yes, how? I have already drawn the polygons on google map using tile mode. Can you suggest me a book/doc that helps with querying mapserver? Thanks, Varun On Sun, May 3, 2009 at 9:56 AM, Steve Lime steve.l...@dnr.state.mn.us wrote: Both examples show how to do this. You have to create a query using the coordinate from Google to access MapServer. My example uses the principle to query points but would work for polygons (which are actually easier). You could issue straight MapServer queries: http://.../cgi-bin/mapserv?mode=querymap=something.mapmapxy=google_x+google_yqlayer=the_polygons or do a WFS query. Since you're already using straight MapServer the former would probably be easiest. Steve Varun saraf vsaraf@gmail.com 05/02/09 1:34 PM Hi, Thanks a lot Jim and Steve. These are great examples but I am dividing each state of USA into about 1300 polygons and I need a way to find which polygon is selected by the user. I tried building Gpolygons using the polygon data that i have (after converting it into a GML file) but it makes Google damn slow to redraw the polygons on zoom in and zoom out. The tile mode in mapserver is much faster. Now, After I draw the polygon in tile mode using mapserver, Is there a way Mapserver can return to me the specific polygon info (say co-ordinates or any other data in the dbf file relating to that polygon) when I select it on google map? Goggle I believe can give me the exact co-ordinates of the point I clicked. Can mapserver use this point location to find which polygon was selected? Thanks, Varun 2009/5/2 Jim Strevinas voas_...@hotmail.com: A beautiful example that uses the Google Maps API is: http://www.dyasdesigns.com/geoxml/gmlusa.htm It makes use of an API plugin called geoxml that can load XML data which can be produced by a WFS server. In the source code, a static GML file is used but a google search shows that it can connect to a live WFS server using the URL. Date: Sat, 2 May 2009 09:28:01 -0500 From: steve.l...@dnr.state.mn.us To: vsaraf@gmail.com Subject: Re: [mapserver-users] Re: Dynamic data loading using Google maps andMapserver CC: mapserver-users@lists.osgeo.org One way to do that is to construct MapServer queries based on the event and submit them using AJAX. This site does just that but with OpenLayers: http://www.dnr.state.mn.us/waters/csg/index_copy.html Click on the dots and a MapServer query is done behind the scenes. If successful a little window control is populated, if not, then nothing happens. Simple templates are used to present the information. Steve Varun saraf vsaraf@gmail.com 05/01/09 11:54 AM Hi, I just had a look at ImageMap Template on Output generation...Can this be used on google maps to get information pooped up on a mouseover or mouseclick in tile mode? If not, what is it that I can do to get a similar result when using Mapserver with google maps? Regards, Varun On Thu, Apr 30, 2009 at 6:30 PM, Varun saraf vsaraf@gmail.com wrote: Hi, I have successfully drawn layers on of google maps as base using mapserver. However, I am trying to figure out how to get data dynamically displayed on the web page when a user clicks on a certain area. For example, I have divided the entire state of virginia into many sectors (using a polygon shp file). My requirement is that I want data to come up on the map/web page when the user selects a particular sector. I know google provides me with an event api for clicking on the map but how do I pass this event to mapserver so it can send me the label for that sector from the shape file? I need to be able to recognize what sector the user has clicked. Is this possible using just the mapserv cgi script and a map file or a MapScript has to be written/used? Can someone point me in the right direction here? Even providing the link for a previous discussion on this topic would help. Thanks, Varun ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org
[mapserver-users] FOSS4G Conference Registration Opens
Hi all: A quick note to let folks know that registration has opened for the 2009 FOSS4G conference in Sydney, Australia. I've been to a number of these events and they are well worth attending. I expect the Sydney organizing committee to raise the bar yet again. The MapServer project should be well represented! A press release with more details can be found at: - http://wiki.osgeo.org/wiki/FOSS4G_2009_Press_Release_11 The conference website is at: - http://2009.foss4g.org Hope to see you there! Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
G'day Assefa, On 05/05/2009, at 12:16 AM, Yewondwossen Assefa wrote: Do you have the full URL that is received by the server? No... I'm not sure how to get this(?) - I thought it might be shown if I set the debug levels high enough, but so far no luck! MapServer WMS 1.3.0 supports the following EXCEPTIONS : XML, INIMAGE, or BLANK. Is might be possible to add EXCEPTIONS: XML (or INIMAGE, or BLANK) when building your OL wms 1.3.0 layer? using either : new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSVERSION=1.3.0EXCEPTIONS=INIMAGEREQUEST=GetMapSTYLES=SRS=EPSG:4326;' , {layers: 'countries'} ); or new OpenLayers.Layer.WMS( 'Tail Tag Areas', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG:4326' , {layers: 'tailtagareas', transparent: 'true', version: '1.3.0', exceptions: 'xml'} ); gives no error, but neither do I receive any images any more. using the url (such as in the first example) works fine in QGIS, so I'm guessing the web serving 'can' work... very confusing. cheers Ben Ben Madin wrote: G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ layers/ ol_countries_wms .mapSERVICE=WMSVERSION=1.3.0REQUEST=GetMapSTYLES=SRS=EPSG: 4326 I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.mapSERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG:4326;' , {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUSON UNITSDD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH ../geodata/ FONTSET ../geodata/fonts/fonts.lst SYMBOLSET ../trade.sym IMAGECOLOR 230 240 255 CONFIG MS_ERRORFILE /var/log/mserr.log DEBUG 5 PROJECTION init=epsg:4326 END WEB METADATA wms_title GMS Livestock Trade wms_onlineresource http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map; wms_srs EPSG:4326 END IMAGEPATH ../../tmp/ IMAGEURL../../tmp/ END LAYER METADATA wms_title Country Boundaries wms_srsEPSG:4326 wms_group_title Political END STATUSON NAMEcountries GROUPPolitical DATAglobal/ctybnda TYPEpolygon OPACITY 100 CLASS NAMECountry Borders COLOR240 240 180 OUTLINECOLOR 0 70 0 END END -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 b...@remoteinformation.com.au Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users