javascript - Zoom and highline features from wkt openlayers? -
i have polygon wkt format : polygon ((30 10, 40 40, 20 40, 10 20, 30 10))
i want zoom feature , make highline ,can give me example?
i found solution , work me
function zoombywkt(wkt){ var feature=new openlayers.feature.vector(openlayers.geometry.fromwkt(wkt)); selectvector.removeallfeatures(); selectvector.addfeatures([feature]); vectorhightlight.activate(); vectorhightlight.select(feature); vectorhightlight.deactivate(); // zoom map.zoomtoextent(selectvector.features[0].geometry.getbounds()); }
vectorhightline select control , make u features highline select .
Comments
Post a Comment