<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Not sure I follow this.<div><br></div><div>Template is an empty layer in my map file we use to add shapes to for display.</div><div><br></div><div>My Feature layer is a shapefile of business point locations.</div><div><br></div><div>What does queryable mean in relation to a shapefile of points?<br><br>Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701<br><br><div><hr id="stopSpelling">From: Steve.Lime@state.mn.us<br>To: mmcinnis59@msn.com; mapserver-users@lists.osgeo.org<br>Subject: RE: [mapserver-users] No points selected with queryByShape<br>Date: Tue, 17 Sep 2013 22:16:16 +0000<br><br>



<style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}

.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}

.ExternalClass p {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass span.ecxEmailStyle18 {
font-family:"Calibri","sans-serif";
color:#1F497D;
}

.ExternalClass .ecxMsoChpDefault {
font-size:10.0pt;
}

.ExternalClass div.ecxWordSection1 {
}

--></style>


<div class="ecxWordSection1">
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Is your feature layer queryable? That is, does is have a value set for TEMPLATE? Even ‘TEMPLATE void’ will do.</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Steve</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;">
<p class="ecxMsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";">From:</span></b><span 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>Michael McInnis<br>
<b>Sent:</b> Tuesday, September 17, 2013 4:51 PM<br>
<b>To:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-users] No points selected with queryByShape</span></p>
</div>
</div>
<p class="ecxMsoNormal"> </p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">I'm baffled on this one!<br>
<br>
I get a shape object $circle and I have a point layer $bizLayer.<br>
I know they are both valid as they overlay as expected on my map.<br>
<br>
When I call printBusiness to use queryByShape to get the points in the shape it always returns 0 for $numResults.
<br>
<br>
Am I missing a step somewhere?<br>
<br>
// Get shape from point and radius<br>
$circle = createCircle($latlonPoint,$radius);<br>
<br>
echo 'Biz Count : ';<br>
$bizCount = printBusiness($bizLayer,$circle);<br>
echo $bizCount;<br>
<br>
// Draw all the layers per basic1.map<br>
$image=$map->draw();<br>
<br>
// Draw circle - reads shp->draw(map,template,image);<br>
$circle->draw($map,$emptyLayer,$image);<br>
<br>
$image_url=$image->saveWebImage();<br>
<br>
<br>
function printBusiness($featureLayer,$shp){<br>
    <br>
    $featureLayer->queryByShape($shp);<br>
    $numResults = $featureLayer->getNumResults();<br>
<br>
    if($numResults > 0){<br>
        echo 'if';<br>
        return $numResults;<br>
    }else{<br>
        echo 'else';<br>
        return 0;<br>
    }<br>
}</span></p>
</div>
</div></div></div>                                      </div></body>
</html>