Commit 91c34e4c04a3bca2da152ed2d6bca74c914143eb
1 parent
b6477065
Exists in
master
and in
7 other branches
Corrige a captura de elementos pontuais no mashup OpenLayers
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
mashups/openlayers.js.php
... | ... | @@ -294,7 +294,13 @@ i3GEOOL = { |
294 | 294 | var layers = [i3GEOOL.layerAtivo()]; |
295 | 295 | var u = layers[0].url+"&request=getfeature&service=wfs&version=1.0.0"; |
296 | 296 | u += "&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS; |
297 | - u += "&filter=<Filter><Intersect><PropertyName>Geometry</PropertyName><gml:Point><gml:coordinates>"+lonlat+"</gml:coordinates></gml:Point></Intersect></Filter>"; | |
297 | + //u += "&filter=<Filter><Intersect><PropertyName>Geometry</PropertyName><gml:Point><gml:coordinates>"+lonlat+"</gml:coordinates></gml:Point></Intersect></Filter>"; | |
298 | + var xy = lonlat.split(","); | |
299 | + xy[0] = xy[0] * 1; | |
300 | + xy[1] = xy[1] * 1; | |
301 | + var poligono = (xy[0]-0.1)+","+(xy[1]+0.1) + " "+(xy[0]+0.1)+","+(xy[1]+0.1)+" " + (xy[0]+0.1)+","+(xy[1]-0.1)+" " + (xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1); | |
302 | + u += "&filter=<Filter><Intersect><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersect></Filter>"; | |
303 | + | |
298 | 304 | document.body.style.cursor="wait"; |
299 | 305 | document.getElementById("i3geoMapa").style.cursor = "wait"; |
300 | 306 | OpenLayers.Request.issue({ | ... | ... |