Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. function add_point(map, location) {
  2. upcoming_point = {lat: location.lat(), lng:location.lng() }
  3. poligon_array.push(upcoming_point)
  4.  
  5. if(polygon_array.length>5){
  6. polygon_array.shift();
  7. }
  8. create_Polygon(polygon_array);
  9. }
  10.  
  11. function create_Polygon(polygon_array) {
  12. var Polygon = new google.maps.Polygon({
  13. paths: polygon_array,
  14. strokeColor: '#FF0000',
  15. strokeOpacity: 0.8,
  16. strokeWeight: 2,
  17. fillColor: '#FF0000',
  18. fillOpacity: 0.35
  19. });
  20. Polygon.setMap(map);
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement