how to highlight zoomed feature in ol3

المشرف العام

Administrator
طاقم الإدارة
Hi all,

var owsURL = "http://192.168.1.137:8080/geoserver/school/ows"; var SearchResultsLayer = new ol.layer.Vector({ id: 'SearchResultsLayer', style: function (feature, resolution) { style.getText().setText(resolution < 5000 ? feature.get('') : ''); return styles; } }); function Zoomto(filter, SearchResultsLayer) { var talukname = $('#ddlschool').val(); alert(talukname); var filter = "talukname='" + talukname + "'"; alert(filter); $.ajax({ url: owsURL, type: 'GET', contentType: 'application/json', dataType: 'jsonp', jsonpCallback: "parseResponse", data: { typeName: "school:taluk", outputFormat: "text/javascript", service: "WFS", version: "1.1.0", request: "GetFeature", CQL_FILTER: filter }, success: function (response) { var SearchResultsLayer = new ol.layer.Vector({}); SearchResultsLayer.setSource(null); var searchresultssource = new ol.source.Vector({ features: (new ol.format.GeoJSON()).readFeatures(response, { featureProjection: "EPSG:3857" }) }); SearchResultsLayer.setSource(searchresultssource); map.getView().fit(SearchResultsLayer.getSource().getExtent(), map.getSize()); } }); }this is my zooming function.its working fine.now i want to highlight zoomed feature.can any one help me how to achieve it.talukname



أكثر...
 
أعلى