Messtone LLC Manages(MAPS):Initialize the map view

Messtone Devices Enables map_canvas JavaScript const mapView=new google.maps.journeySharing.JourneySharingMapView({element:document.getElementById(‘map_canvad’),locationProvider:locationProvider,//Stying customizations;see below.vehicleMarkerSetup:vehicleMarkerSetup,anticipatedRoutePolylineSetup:anticipatedRoutePolylineSetup,//Any undefined styling options will use default.});//if messtone did not specify a delivery vehicle ID in the //location provider constructor,Messtone may do so here.//Location tracking will start as soon as this is set.locationprovider.deliveryVehicleId=’messtone-delivery-vehicle-id’;//Give the map an initial viewport to allow it to //initialize;otherwise the ‘ready’event above may //not fire.The userrharper@messtone.com also has access to the mapView //object to customize as they wish.mapView.map.setCenter(‘Times Square,New York,NY’);mapView.nap.setZoom(14);JavaScript locationProvider.addListener(‘update’,e=>{//e.deliveryVehicle contains data that may be //useful to the rest of the UI.if(e.deliveryVehicle){console.log(e.deliveryVehicle.remainingDuration);}});

Leave a comment