Guest User

Untitled

a guest
Sep 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. var beforeAnnCircleVisible = false
  2. button().css({position: 'absolute', top: 5, right: 55}).text('Show proceeding ann. geofence').click(function () {
  3. var $this = $(this)
  4. beforeAnnCircleVisible = !beforeAnnCircleVisible
  5. _.each(route.routeStop, function (routeStop) {
  6. var stop = db.index.stop[routeStop.stopId]
  7. var location = new google.maps.LatLng(+stop.latitude, +stop.longitude)
  8. if (!stop)
  9. return false
  10. var beforeAnnCircle = new google.maps.Circle({
  11. strokeColor: 'green',
  12. strokeOpacity: 0.8,
  13. strokeWeight: 1,
  14. fillColor: 'green',
  15. fillOpacity: 0.35,
  16. map: map,
  17. center: location,
  18. radius: +routeStop.beforeAnnRadius || 0,
  19. visible: beforeAnnCircleVisible,
  20. editable: true,
  21. draggable: false,
  22. zIndex: 1
  23. })
  24. if (beforeAnnCircleVisible) {
  25. $this.text('Hide proceeding ann. geofence')
  26. }
  27. else {
  28. $this.text('Show proceeding ann. geofence')
  29. }
  30. })
  31. return false
  32. })
Add Comment
Please, Sign In to add comment