javascript - Check if LatLong is inside a polygon -
i have got lat , lon of person ,i need find person within or outside of particular polygon. since using kml vector overlay show zone on openlayers google map .please advice
in init: function() //awesome design style = { stylemap: new openlayers.stylemap({ "temporary": style})}; //make layer this.selectlayer = new openlayers.layer.vector("draw_polygon", style); //make command this.selectcontrol = new openlayers.control.drawfeature(this.selectlayer, openlayers.handler.polygon, {featureadded: this.toggledraw}); whatever.map.addcontrol(this.selectcontrol); then: toggledraw: function(feature) { //do magic finding if uses within (example) search_options.viewmodel.searchforperson(feature); }
i'm afraid cannot give total code, idea.
javascript google-maps-api-3 openlayers
No comments:
Post a Comment