anchor.diff:            mapTypeControl: false,
             center: myPosition
           };
  -        var map = new google.maps.Map(document.getElementById('map'), mapOptions);
  +         map = new google.maps.Map(document.getElementById('map'), mapOptions);
   
   
           $.ajax({
  
positive.code: 
              console.log(response);
  
              var routePointsArray = [];
              // for(var i = 0; i < response['routes'].length; i++){
                var routePoints = response['routes'][0].overview_path
  
                  // for(var obj in routePoints){
                  //   console.log(routePoints[obj].lat());
                  //   console.log(routePoints[obj].lng());
                  //   console.log("------------")
                    routePointsArray.push([routePoints[0].lat(), routePoints[0].lng()])
                    routePointsArray.push([routePoints[routePoints.length - 1].lat(), routePoints[routePoints.length - 1].lng()])
                    console.log(routePointsArray);
                    // console.log(routePointsArray);
                  // }
              // }
                // console.log(routePointsArray)
               // console.log(response['routes']['0'].overview_path[0].lat())
              me.directionsDisplay.setDirections(response);
            } else {
              window.alert('Directions request failed due to ' + status);
  
negative.code:               addSavedMarker(marker, map);
              }
          })
            // var routePath = new google.maps.Polyline({
            //   path:  [
            //     new google.maps.LatLng(41.876580000000004, -87.65322),
            //     new google.maps.LatLng(41.87664, -87.64839),
            //     new google.maps.LatLng(41.876670000000004, -87.64722)
            //   ]
            // });
            // routePath.setMap(map);
  
  
  
  
  
          new AutocompleteDirectionsHandler(map);
  
          google.maps.event.addListener(map, 'click', function(event) {
            addSavedMarker(event.latLng, map);
          });
  
        } //end of map init
        var hereRoute = function(start,end){
          console.log("function was successfully called")
          console.log(start);
          console.log(end);
  
            hereURL = "https://route.cit.api.here.com/routing/7.2/calculateroute.json?app_id=9mBaxBeJ7mApiH1ztTZo&app_code=5yfWfBxENAXQsu5zhv6Lcw&waypoint0=geo!"+ start[0] + ',' + start[1] + "&waypoint1=geo!"+ end[0] + ',' + end[1] + "&mode=fastest;bicycle;traffic:disabled&avoidareas=41.87663,-87.65073;41.87661,-87.65071"
  
            var path = []
            $.ajax({
  