I am trying to create a route to a marker object in the AR view, and the way i am planning on doing that is just to have waypoints the user can follow to reach the marker. I am getting the waypoints using the Google Directions API, and then only using the Lat and Lng of the waypoints. I am using those values to create GeoLocations and putting those into an array, which is then used to draw GeoObjects on a certain drawable i created. However, none of these GeoObjects are being displayed, i am unsure where i went wrong, any help would be greatly appreciated. My code is shown below:
onPoiRouteButtonClicked: function onPoiRouteButtonClickedFn() {
var directionsService = new google.maps.DirectionsService;
var currentMarker = World.currentMarker;
World.routeMarkerDrawable = new AR.ImageResource("assets/route.png");
var routeList = [];
var start = new google.maps.LatLng(World.userLocation.latitude, World.userLocation.longitude); var end = new google.maps.LatLng(currentMarker.poiData.latitude, currentMarker.poiData.longitude);
Andrew Bardac
I am trying to create a route to a marker object in the AR view, and the way i am planning on doing that is just to have waypoints the user can follow to reach the marker. I am getting the waypoints using the Google Directions API, and then only using the Lat and Lng of the waypoints. I am using those values to create GeoLocations and putting those into an array, which is then used to draw GeoObjects on a certain drawable i created. However, none of these GeoObjects are being displayed, i am unsure where i went wrong, any help would be greatly appreciated. My code is shown below: