Sha256: bf0db0db5de41f06f8e6a8a948014e29daadc62c2412400bea0df9fc03f8bf7d
Contents?: true
Size: 730 Bytes
Versions: 1
Compression:
Stored size: 730 Bytes
Contents
@Gmaps4Rails.PolylineController = replacePolylines : (polylineData) -> #reset previous polylines and kill them from map @clearPolylines() #set new polylines @addPolylines(polylineData) #.... and adjust map boundaries @adjustMapToBounds() clearPolylines : -> for polyline in @polylines #delete polylines from map polyline.clear() #empty array @polylines = [] #polylines is an array of arrays. It loops. addPolylines: (polylineData)-> for polylineArgs in polylineData @polylines.push @createPolyline(polylineArgs) showPolylines : -> for polyline in @polylines polyline.show() hidePolylines : -> for polyline in @polylines polyline.hide()
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gmaps4rails-2.0.0.pre | vendor/assets/javascripts/gmaps4rails/base/main_controller_extensions/polyline_controller.coffee |