Open layers3- zoom to a selected feature

المشرف العام

Administrator
طاقم الإدارة
I am working with OpenLayers 3. I used a dropdown menu to select a feature and I would like to zoom to the extent of the selected feature. At the moment, it is possible to select by the dropdown menu but not to zoom. Is there anyway to fix this?

function selectByDivision(){ var divisionUser = document.getElementById('division-select').options[document.getElementById('division-select').selectedIndex].text; var selectedFeatures = select.getFeatures(); selectedFeatures.clear(); var features = lyr_divisions3857.getSource().getFeatures(); if(features){ for(i=0;i
 
أعلى