   					handler.fitMapToBounds()
   				)
 	)
-		
-	x = 0
-
+	
 	cur_location = navigator.geolocation.watchPosition( 
 		(pos) ->
 			data =  {hoaroute: {

  		polylines = handler.addPolylines(route, 
  			{strokeColor: "#cc00cc", strokeWeight: 4}
  			)
  		# navigator.geolocation.getCurrentPosition(
  		# 	(pos) ->
				# handler.map.centerOn({lat: pos.coords.latitude, lng: pos.coords.longitude})
  		# )
  		handler.bounds.extendWith(polylines)
  		handler.fitMapToBounds()
  	)

		
	
	# myParser = new geoXML3.parser({map: handler})
	# myParser.parse(xml.responseXML)


$(document).on('ready ["#route-page"]', ->

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

buildmap = (handler,route) ->
	
