私は人の緯度と経度を取得しました。この人が特定のポリゴンの内側または外側にいることを見つける必要があります。KMLベクターオーバーレイを使用してopenlayers Googleマップにゾーンを表示しているため、アドバイスをお願いします
質問する
191 次
1 に答える
1
In your init: function()
//Awesome design
style = { styleMap: new OpenLayers.StyleMap({ "temporary": style})};
//Make the layer
this.selectLayer = new OpenLayers.Layer.Vector("draw_polygon", style);
//Make the control
this.selectControl = new OpenLayers.Control.DrawFeature(this.selectLayer, OpenLayers.Handler.Polygon, {featureAdded: this.toggleDraw});
whatever.map.addControl(this.selectControl);
Then:
toggleDraw: function(feature) {
//Do some magic with finding if the uses is inside (example) search_options.viewModel.searchForPerson(feature);
}
申し訳ありませんが、完全なコードを提供することはできませんが、アイデアは理解できます。
于 2013-02-20T09:45:35.743 に答える