<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.gis.mapserver.user">
    <title>gmane.comp.gis.mapserver.user</title>
    <link>http://blog.gmane.org/gmane.comp.gis.mapserver.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34929"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34928"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34927"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34926"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34925"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34924"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34923"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34922"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34921"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34920"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34919"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34918"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34917"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34916"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34915"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34914"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34913"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34912"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34911"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34910"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34929">
    <title>ICON Placing co-ordinates.....</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34929</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Vikas KM</dc:creator>
    <dc:date>2008-12-02T05:08:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34928">
    <title>RE: How to add point based on User interactionusing C#</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34928</link>
    <description>Hi, Pietro Giannini,


  Thanks for great response. I have already done with my task.

Thanks
Venkat.

-----Original Message-----
From: mapserver-users-bounces&lt; at &gt;lists.osgeo.org
[mailto:mapserver-users-bounces&lt; at &gt;lists.osgeo.org] On Behalf Of Pietro
Giannini
Sent: Friday, November 28, 2008 9:05 PM
To: mapserver-users&lt; at &gt;lists.osgeo.org
Subject: Re: [mapserver-users] How to add point based on User interaction
using C#

Hi Venkat.

I found this tutorial very useful:

http://www.paolocorti.net/public/wordpress/index.php/2006/09/20/mapserver-tu
torial-for-c-mapscript-asp-net/

It is exactly what you want, unfortunately it is not reachable now, maybe
a temporary server failure...

I made the same in php_mapscript, db was mysql. You have to do the porting:

___________________________________________________

// get the click point in pixel coordinates
// the imagebutton of the map is named "mapimg"
$clickX = $_REQUEST["mapimg_x"];
$clickY = $_REQUEST["mapimg_y"];

// create a pointobject and store coordinates in projected units
$ppPoint = ms_newpointobj();
$ppPoint-&gt;setXY(($oMap-&gt;extent-&gt;minx + ($oMap-&gt;cellsize * $clickX)),
                           ($oMap-&gt;extent-&gt;maxy - ($oMap-&gt;cellsize *
$clickY)));

// create a lat lon projection
$olatlonProj = ms_newprojectionobj("proj=latlong,ellps=WGS84");

// get the map projection
$osProj = $oMap-&gt;getProjection();
$omapProj = ms_newprojectionobj($osProj);

// project the point in EPSG 4326, latlon wgs84
$ppPoint-&gt;project($omapProj,$olatlonProj);

// insert
$sql = "INSERT INTO pushpins (lon,lat) VALUES ";
$sql .= "(".$ppPoint-&gt;x.",".$ppPoint-&gt;y.")";
$myconn = mysql_connect(mysql_host,mysql_user,mysql_pw);
mysql_select_db(mysql_db);
$res = mysql_query($sql);

// all done.
// only now redraw the map
$oImage = $oMap-&gt;draw();
$sImageUrl = $oImage-&gt;saveWebImage();
___________________________________________________


I hope this is useful

ciao
....................................... pg




On Ven, Novembre 28, 2008 09:09, Venkat Rao Tammineni wrote:


_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Venkat Rao Tammineni</dc:creator>
    <dc:date>2008-12-02T03:55:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34927">
    <title>MapServer 5.2.1 Released</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34927</link>
    <description>Hi all: The MapServer PSC has just released version 5.2.1. This new release contains no additional functionality
but addresses a number of issues identified since the 5.2.0 release. A list of fixes is included at the end of this
message. The full change log can be viewed online at:

  http://mapserver.gis.umn.edu/download/current/HISTORY.TXT 

The source package is available in the MapServer downloads page:  

  http://mapserver.gis.umn.edu/download/current/ 

Precompiled binaries should be available shortly at the usual locations (also linked from the download page above).

Steve

Version 5.2.1 (2008-12-01)
---------------------------------

* Exposed PIXELS value via URL configuration 
* Add Support for SLD TextSymbolizer HALO and ANGLE (#2806) 
* Fix crash when an invalid bbox filter is used (#2805) 
* raster query fix for tileindex with relative paths (#2722) 
* Fix for the access violation caused by msMSSQL2008LayerGetShape (#2795) 
* Fixed msMSSQL2008LayerGetItems to retrieve the column names properly (#2791) 
* Prevent from calling msMSSQL2008CloseConnection from msMSSQL2008LayerClose causing memory corruption issues (#2790) 
* fix some integer rounding errors in the agg line offseter (#2659) 
* fix a bug with shapes with duplicate end points. was causing NaNs in the angle follow placement code (#2695) 
* memory leak in msInsertLayer, from Ned Horning (#2784) 
* legend keyimage resampling with agg (#2715) 
* tileindexed rasters when DATA is manipulated via mapscript work (#2783) 
* PHP: add priority attribute to the label object (#2782) 
* Fixed bug when QUERYMAP hilite color is set and the shape's color in a layer is from a data source (#2769) 
* PHP paste image should also work with AGG (#2682) 
* Correct allocation error in mapmssql2008.c (#2768) 
* Removed comma to correct WCS 1.1 Coverages formatting in payload directory. (#2764) 
* Correct bug when LABEL_NO_CLIP in combination with minfeaturesize (#2758) 
* Fix a label size computation for AGG bug when scalefactor is used (#2756) 
* Got rid of misleading errors about OWS SERVICE not being compiled in when a OWS request is sent that includes mode=map (or other mode value different from ows)(#2747) 
* Fixed a memory leak associated with not deleting the lexer buffer before parsing certain types of strings. (#2729) 
* Masking the out-of-range characters to avoid the crash in the AGG renderer (#2739) 
* AGG: fix pixmap symbols not drawing if no color was specified (#2736) 
* Accept WMS requests in which the optional SERVICE param is missing. A new test was incorrectly added in 5.2.0 that resulted in the error "Incomplete WFS request: SERVICE parameter missing" when the SERVICE parameter was missing in WMS requests in which the SERVICE param is optional (#2737) 
* SLD: when creating well known symbols on the fly the pen-up value used should be -99. 
* Support reading projection parameter for OFC filters (#2712) 
* Stop configure execution with an error if path to one of the -config scripts is invalid (#2710) 
* Fixed the configure script: failed to detect php5 on ubuntu. (#2365) 


_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Steve Lime</dc:creator>
    <dc:date>2008-12-01T20:14:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34926">
    <title>Re: pyramid, .rrd file</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34926</link>
    <description>
Attila,

Generally speaking Mapserver should already take advantage of .rrd
pre-built overviews.  If you want to confirm if GDAL (and consequently
MapServer) can see the overviews, run the gdalinfo utility on the base
file, and check the report of the individual bands to see if they have
an overviews list.

For example

gdalinfo image_col.img
...
Band 1 Block=64x64 Type=UInt16, ColorInterp=Undefined
   Description = Layer_1
   Min=232.000 Max=1024.000
   Minimum=232.000, Maximum=1024.000, Mean=335.990, StdDev=26.558
   NoData Value=65535
   Overviews: 692x600, 345x299, 171x148, 84x73, 41x35
...

This file has an .rrd ith 5 overview levels and they would be used
by MapServer as long as the .rrd file is kept with the .img file.

Best regards,
</description>
    <dc:creator>Frank Warmerdam</dc:creator>
    <dc:date>2008-12-01T19:04:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34925">
    <title>Re: MapServer 5 - MapScript Problem setExpression</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34925</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Gill Bates</dc:creator>
    <dc:date>2008-12-01T16:06:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34924">
    <title>Re: MapServer 5 - MapScript ProblemsetExpression</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34924</link>
    <description>That should fix it. The problem is that MapServer strings must start
with a alpha character. Otherwise
they must be quoted.

Steve

&lt;4933FD15.40109&lt; at &gt;dmsolutions.ca&gt;,
Yewondwossen Assefa &lt;yassefa&lt; at &gt;dmsolutions.ca&gt; wrote:

------------------------------------------------------------------------
_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Steve Lime</dc:creator>
    <dc:date>2008-12-01T16:03:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34923">
    <title>Re: MapServer 5 - MapScript Problem setExpression</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34923</link>
    <description>
Can you try something like $oClass-&gt;setExpression('"3NA"')

Later,

Géo Sphère wrote:


</description>
    <dc:creator>Yewondwossen Assefa</dc:creator>
    <dc:date>2008-12-01T15:04:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34922">
    <title>MapServer 5 - MapScript Problem setExpression</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34922</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Géo Sphère</dc:creator>
    <dc:date>2008-12-01T14:24:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34921">
    <title>Re: LINE layer on small scales</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34921</link>
    <description>
GROUPed layers are a bit different from normal layers. For instance it
seems I can't set keywords for grouped layers (No OWS_GROUP_KEYWORDLIST),
which is something I need for my application. I could probably change my
app to also work with nested layers but that looks like a lot of work. :-)

Jochen
</description>
    <dc:creator>Jochen Topf</dc:creator>
    <dc:date>2008-12-01T11:50:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34920">
    <title>Re: LINE layer on small scales</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34920</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Stephan Holl</dc:creator>
    <dc:date>2008-12-01T11:19:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34919">
    <title>pyramid, .rrd file</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34919</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Berényi Attila</dc:creator>
    <dc:date>2008-12-01T10:45:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34918">
    <title>LINE layer on small scales</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34918</link>
    <description>Hi!

I have bunch of linestrings I want to show in one layer. Each linestring
should show up as a line on large scales and as a symbol on small
scales, because on the small scales the lines are too short to see.

I know how to do this with two layers: One LINE layer and one POINT
layer with the same underlying data.

But I'd rather do this in one layer and use different CLASSes for the
different scales. But when I do this the symbols keep disappearing on
smaller scales, I guess because the linestrings get so short that
Mapserver decides to not draw them at all.

Can this be done? Any ideas?

Jochen
</description>
    <dc:creator>Jochen Topf</dc:creator>
    <dc:date>2008-12-01T10:15:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34917">
    <title>Re: how to load tiff image on to mapserver...</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34917</link>
    <description>See:

http://ms.gis.umn.edu/docs/howto/raster_data

Best regards,
Bart







_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>bartvde&lt; at &gt;osgis.nl</dc:creator>
    <dc:date>2008-12-01T10:12:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34916">
    <title>how to load tiff image on to mapserver...</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34916</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Vikas KM</dc:creator>
    <dc:date>2008-12-01T10:08:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34915">
    <title>Re: grayscale images using classgroups</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34915</link>
    <description>I found a formula RGB2grayscale = 0.299R + 0.587G + 0.114B and would like to apply this on a class section in order to use the STYLE-parameter for serving a raster layer colored or generic grayscaled. Due to processing instructions work on layer level only, they do not help in this case. I'm looking for a solution like this:

  CLASS
    CLASSGROUP 'grayscale'
    STYLE
      COLOR [grayscale] [grayscale] [grayscale]
    END
  END

  CLASS
    CLASSGROUP 'color'
    STYLE
      COLOR [red] [green] [blue]
    END
  END


-------- Original-Nachricht --------

_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Martin Kofahl</dc:creator>
    <dc:date>2008-12-01T05:26:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34914">
    <title>Re: How to add point based on User interaction using C#</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34914</link>
    <description>Hi Venkat.

I found this tutorial very useful:

http://www.paolocorti.net/public/wordpress/index.php/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/

It is exactly what you want, unfortunately it is not reachable now, maybe
a temporary server failure...

I made the same in php_mapscript, db was mysql. You have to do the porting:

___________________________________________________

// get the click point in pixel coordinates
// the imagebutton of the map is named "mapimg"
$clickX = $_REQUEST["mapimg_x"];
$clickY = $_REQUEST["mapimg_y"];

// create a pointobject and store coordinates in projected units
$ppPoint = ms_newpointobj();
$ppPoint-&gt;setXY(($oMap-&gt;extent-&gt;minx + ($oMap-&gt;cellsize * $clickX)),
                           ($oMap-&gt;extent-&gt;maxy - ($oMap-&gt;cellsize *
$clickY)));

// create a lat lon projection
$olatlonProj = ms_newprojectionobj("proj=latlong,ellps=WGS84");

// get the map projection
$osProj = $oMap-&gt;getProjection();
$omapProj = ms_newprojectionobj($osProj);

// project the point in EPSG 4326, latlon wgs84
$ppPoint-&gt;project($omapProj,$olatlonProj);

// insert
$sql = "INSERT INTO pushpins (lon,lat) VALUES ";
$sql .= "(".$ppPoint-&gt;x.",".$ppPoint-&gt;y.")";
$myconn = mysql_connect(mysql_host,mysql_user,mysql_pw);
mysql_select_db(mysql_db);
$res = mysql_query($sql);

// all done.
// only now redraw the map
$oImage = $oMap-&gt;draw();
$sImageUrl = $oImage-&gt;saveWebImage();
___________________________________________________


I hope this is useful

ciao
....................................... pg




On Ven, Novembre 28, 2008 09:09, Venkat Rao Tammineni wrote:


_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Pietro Giannini</dc:creator>
    <dc:date>2008-11-28T15:35:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34913">
    <title>How to add point based on User interaction usingC#</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34913</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Venkat Rao Tammineni</dc:creator>
    <dc:date>2008-11-28T08:09:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34912">
    <title>Geometry scaling question</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34912</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Dejan.Gambin&lt; at &gt;pula.hr</dc:creator>
    <dc:date>2008-11-28T07:31:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34911">
    <title>Re: How to add point based on User interaction using C#</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34911</link>
    <description>Hi,

can you please stop cross-posting e-mails, when this is one is clearly
intended for the users list. Your chance of getting an answer is actually
getting less by cross-posting!

Especially do not use:
mapserver-commits&lt; at &gt;lists.osgeo.org
mapserver-users-owner&lt; at &gt;lists.osgeo.org

Thanks.

Best regards,
Bart



_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>bartvde&lt; at &gt;osgis.nl</dc:creator>
    <dc:date>2008-11-28T07:36:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34910">
    <title>How to add point based on User interaction usingC#</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34910</link>
    <description>_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
</description>
    <dc:creator>Venkat Rao Tammineni</dc:creator>
    <dc:date>2008-11-28T06:14:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34909">
    <title>RE: Preparing/modifying a querymap forfurtherzoom/pan operations...</title>
    <link>http://permalink.gmane.org/gmane.comp.gis.mapserver.user/34909</link>
    <description>Hello Nick. I was stumped by the same thing for a time. I solved it by running the query twice. It feels kludgy, but it works--I'll clean it up later. The first time through is an itemnquery, which does an AJAX call to a template. That returns a set of JSON variables from the template (all I need are the new map extents). These are then stored in the mapserve object extents, following which I rebuild the query as an itemnquerymap. This produces the map of the same query with the qstring items highlighted. I can then pan, zoom, etc. from there. Here's the code I used in the main file. Much of it is shamelessly stolen from better coders than I. The JSON setup in the template is pretty straightforward. I've put it below the javascript. Note that the routines that build the URLs use different mapfiles. One is tailored just for JSON, while the other handles regular queries.

--Jim Haug

// javascript code to do itemnsearch and itemnsearchmap.

// we will be doing searches using ajax/json to provide data. function item_search(),
// which is called from form 'searchform' in the document,
// will set up an itemquery url to send to the server. It will then call
// function getData(url), which will make an ajax call using the itemquery url.
// Data will be returned from the template in json format, which will allow
// function onResponse() to parse it to variables.

  function item_search() {
    var query_url = "";
    var layerlist = ms.getLayers('+');
    if (document.searchform.qitem.value == "site_no") {
      qitem = "site_no";
      qlayer = "sites";
    } else if (document.searchform.qitem.value == "archive") {
      qitem = "archive";
      qlayer = "surveys";
    } else if (document.searchform.qitem.value == "histdist") {
      qitem = "reg";
      qlayer = "hist-dist";
    } else if (document.searchform.qitem.value == "histdistr") {
      qitem = "reg";
      qlayer = "hist-dist-restrict";
    } else if (document.searchform.qitem.value == "bridges") {
      qitem = "propertyna";
      qlayer = "bridges";
    } else if (document.searchform.qitem.value == "cemeteries") {
      qitem = "propertyna";
      qlayer = "cemeteries";
    } else if (document.searchform.qitem.value == "structures") {
      qitem = "propertyna";
      qlayer = "structures";
    } else { // must be trs, since it's the last choice in the form
      qitem = "arms_plss";
      qlayer = "sd_plss";
    }
    qstring = "/" + document.searchform.qstring.value + "/i";
    query_url = ms.mapserver +
               '?mode=itemnquery' + 
               '&amp;map=' + query_mapfile +
               '&amp;qlayer=' + qlayer +
               '&amp;qitem=' + qitem +
               '&amp;qstring=' + qstring +
               '&amp;mapext=shapes' +
               '&amp;mapsize=' + ms.width + '+' + ms.height +
               '&amp;layers=' + layerlist +
               ms.options;
    getData(query_url);
  }

//  this.setLayer = function(name, status) {
//    self.layers[name] = status;
//  }


//--------------&gt; start of itemquery search functions using ajax/json

  var myrequest;

  function getData(url) {
    myrequest=null;
    if (window.XMLHttpRequest) { // code for IE7, Firefox, Mozilla, etc.
      myrequest=new XMLHttpRequest();
    }
    else if (window.ActiveXObject) { // code for IE5, IE6
      myrequest=new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (myrequest!=null) {
      myrequest.onreadystatechange=onResponse;
      myrequest.open("GET",url,true);
      myrequest.send(null);
    }
    else {
      alert("Your browser does not support XMLHTTP.\nYou need to upgrade");
    }
  }

  function onResponse() {
    if(myrequest.readyState!=4) return;
    if(myrequest.status!=200) {
      alert("Problem retrieving data");
      return;
    }
    if (myrequest.responseText.indexOf("msQuery") != -1) {
      alert("No item found in search");
    }
    else {
      // parse the returned query data
      var my_ms = eval('(' + myrequest.responseText + ')');
      // all we really need are the extents (minx and y, max x and y) in order
      // to set up a new map to be drawn

      // make sure the page is ready to display a map
      ms.mode = "map";
      // buffer the coordinates by 1000 map units (set to meters in map file)
      minx = parseFloat(my_ms.minx) - 1000;
      miny = parseFloat(my_ms.miny) - 1000;
      maxx = parseFloat(my_ms.maxx) + 1000;
      maxy = parseFloat(my_ms.maxy) + 1000;
      ms.setExtent(minx, miny, maxx, maxy);
      var layerlist = ms.getLayers('+');
      if (document.searchform.qitem.value == "site_no") {
        qitem = "site_no";
        qlayer = "sites";
      } else if (document.searchform.qitem.value == "archive") {
        qitem = "archive";
        qlayer = "surveys";
      } else if (document.searchform.qitem.value == "histdist") {
        qitem = "reg";
        qlayer = "hist-dist";
      } else if (document.searchform.qitem.value == "histdistr") {
        qitem = "reg";
        qlayer = "hist-dist-restrict";
      } else if (document.searchform.qitem.value == "bridges") {
        qitem = "propertyna";
        qlayer = "bridges";
      } else if (document.searchform.qitem.value == "cemeteries") {
        qitem = "propertyna";
        qlayer = "cemeteries";
      } else if (document.searchform.qitem.value == "structures") {
        qitem = "propertyna";
        qlayer = "structures";
      } else { // must be trs, since it's the last choice in the form
        qitem = "arms_plss";
        qlayer = "sd_plss";
      }
      qstring = "/" + document.searchform.qstring.value + "/i";
      if(ms.referencemap) {
        ms.referencemap.url = ms.mapserver +
                            '?mode=reference' +
                            '&amp;map=' + ms.referencemap.mapfile +
                            '&amp;mapext=' + ms.extent.join('+') +
                            '&amp;mapsize=' + ms.width + '+' + ms.height;  
      }
      ms.url = ms.mapserver +
              '?mode=itemnquerymap' + 
              '&amp;map=' + query_mapfile +
              '&amp;qlayer=' + qlayer +
              '&amp;qitem=' + qitem +
              '&amp;qstring=' + qstring +
              '&amp;mapext=' + ms.extent.join('+') +
              '&amp;mapsize=' + ms.width + '+' + ms.height +
              '&amp;layers=' + layerlist +
              ms.options;
      ms_draw();
    }
  }

//--------&gt; end of itemquery search functions


=========================================
JSON code from queryfooter.html

{
  "minx": "[minx]",
  "miny": "[miny]",
  "maxx": "[maxx]",
  "maxy": "[maxy]",
}



-----Original Message-----
From: mapserver-users-bounces&lt; at &gt;lists.osgeo.org on behalf of nikos&lt; at &gt;maich.gr
Sent: Thu 11/27/2008 3:22 PM
To: mapserver-users&lt; at &gt;lists.osgeo.org
Subject: [mapserver-users] Preparing/modifying a querymap for furtherzoom/pan operations...
 
Hello all,

I'm trying to use a generated query map (itemnquery) and insert it back
into my main MS interface foe further processing, e.g zoom/pan/query...
My map is generated with &amp;mapext=shapes

I'm making an Ajax call to MS, and returning a pointer to the generated
querymap, and updating my map.

This part works...

Problem is that when I then go to zom/pan/query, the results are not what
are expected, e.g my form still has the "before query" instance/variables
and takes off from there, meaning it does not for instance zoom to the
iamge displayed

would appreciate some help,

tia,

nick boretos

_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users&lt; at &gt;lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

</description>
    <dc:creator>Jim.Haug&lt; at &gt;state.sd.us</dc:creator>
    <dc:date>2008-11-28T04:20:45</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.gis.mapserver.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gis.mapserver.user</link>
  </textinput>
</rdf:RDF>
