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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -