<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-AU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>I have a work around –
I am maintaining the selection in the database and have defined a class to
highlight the selected features – ironically making my data section even
more verbose.<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>If I have to come back to
this I will have a look at the simple view approach (you should see some of my
other data statements).<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Unfortunately Postgis is not
an option as we have lots of distributed components that all work with MSSQL,
the only way we would do that is to link a postgis server to the sql one and
use some sort of data synchronization.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>G<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Tamas
Szekeres<br>
<b>Sent:</b> Thursday, 4 February 2010 9:43 AM<br>
<b>To:</b> Gabe Codina<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] msplugin_mssql2008 and getFeature()<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Gabe,<br>
<br>
I suspect your issue may be related to some parsing problem with the DATA
section. I think you might want to try defining a single view for your data and
then use this view to define the DATA section like:<br>
<br>
gExtent from MyView using unique [iId] using SRID=4326<br>
<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class=MsoNormal>2010/2/3 Gabe Codina <<a href="mailto:Gabe@agtrix.com">Gabe@agtrix.com</a>><o:p></o:p></p>
<p class=MsoNormal>Hi All<br>
<br>
I have a web mapping app based on ms 5.2.1 and php mapScript. Our
business<br>
layers are stored in MSSQL2008 and were transferred from postgis some time<br>
ago.<br>
<br>
I have a requirement to highlight selected features on the map - the way<br>
this used to work was I would add a highlight layer to the map and addthe<br>
selected features to it by using getShape and addFeature.<br>
<br>
Using the mssql plugin my calls to getShape (and getFeature) always return<br>
FALSE. I know the features are there but they cannot be retrieved.<br>
<br>
Info:<br>
<br>
Sample data statement<br>
<br>
DATA "gExtent FROM (SELECT [iId],geometry::STGeomFromWKB([binExtentWKB],<br>
4326) AS gExtent<br>
,[cIdentifiers],[cLabel],[iSessionId] FROM<br>
[Scratch].[tManagementUnitsGeometry] WHERE [iSessionId] = 310) AS FOO USING<br>
UNIQUE [iId] USING SRID=4326"<br>
<br>
Some Mapscript<br>
<br>
if ($resTileShpIdx){<br>
$resShape
= $qLayer->getShape($resTileShpIdx,<br>
$resShpIdx);<br>
} else {<br>
$resShape
= $qLayer->getFeature($resShpIdx);<br>
}<br>
<br>
...<br>
<br>
<br>
$newResLayer->addFeature($resShape);<br>
<br>
<br>
Any help will be greatly appreciated.<br>
<br>
Gabe Codina<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>