Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var beforeAnnCircleVisible = false
- button().css({position: 'absolute', top: 5, right: 55}).text('Show proceeding ann. geofence').click(function () {
- var $this = $(this)
- beforeAnnCircleVisible = !beforeAnnCircleVisible
- _.each(route.routeStop, function (routeStop) {
- var stop = db.index.stop[routeStop.stopId]
- var location = new google.maps.LatLng(+stop.latitude, +stop.longitude)
- if (!stop)
- return false
- var beforeAnnCircle = new google.maps.Circle({
- strokeColor: 'green',
- strokeOpacity: 0.8,
- strokeWeight: 1,
- fillColor: 'green',
- fillOpacity: 0.35,
- map: map,
- center: location,
- radius: +routeStop.beforeAnnRadius || 0,
- visible: beforeAnnCircleVisible,
- editable: true,
- draggable: false,
- zIndex: 1
- })
- if (beforeAnnCircleVisible) {
- $this.text('Hide proceeding ann. geofence')
- }
- else {
- $this.text('Show proceeding ann. geofence')
- }
- })
- return false
- })
Add Comment
Please, Sign In to add comment