「ol015-nippon_bmi_akiruno_pgis.html」 ファイルを続けて使います。
変形ボタンは次のようなものを作成して、"OpenLayers-2.13.1/theme/default/img/ に保存しました。


modify_feature_off.png
<style> に変形ボタンのスタイルを追加
---
// ここから追加 .olControlModifyFeatureItemActive { background-image: url(OpenLayers-2.13.1/theme/default/img/modify_feature_on.png); background-repeat: no-repeat; background-position: 0px 1px; } .olControlModifyFeatureItemInactive { background-image: url(OpenLayers-2.13.1/theme/default/img/modify_feature_off.png); background-repeat: no-repeat; background-position: 0px 1px; } // ここまで---
移動ボタンのコードを追加
---
new OpenLayers.Control.DragFeature( vectors, { title: "Drag Feature", displayClass: 'olControlDragFeature' }),
// ここから追加 new OpenLayers.Control.ModifyFeature(vectors,{ title: "Modify Feature", displayClass: "olControlModifyFeature" }), // ここまで
new OpenLayers.Control.SelectFeature(---

0 件のコメント:
コメントを投稿