Category : maps

I am using Leaflet and routing.control to show a route, the route is A to B on road, but I need to calculate some points in the middle of the route generated. The code I am using to generate the route is the following: this.arrRoutesLatLng[0] = this.createLatLng(this.loc_origen.latitud, this.loc_origen.longitud); this.arrRoutesLatLng[1] = this.createLatLng(this.loc_destino.latitud, this.loc_destino.longitud); // Crear la ..

Read more

Hello I am using google maps. Drawing Manager for polygon. Edit and add works completely fine. But i want to remove some of that polygon so i need to implement remove polygon shape option in map. async drawPolygon() { this.drawingManager = new google.maps.drawing.DrawingManager({ drawingControl: true, drawingControlOptions: { drawingModes: ["polygon"] }, polygonOptions: { strokeOpacity: 0.8, strokeColor: ..

Read more

I would like to see the Route Information inside the Tag Likes this: enter image description here But Instead is just see this: enter image description here Thats my code: <agm-map [latitude]="origin.lat" [longitude]="origin.lng" [scrollwheel]="false" [keyboardShortcuts]="true" [zoom]=17> <agm-marker [latitude]="origin.lat" [longitude]="origin.lng"> <agm-info-window [disableAutoPan]="true"></agm-info-window> </agm-marker> <agm-direction *ngIf="destination" [origin]="origin" [destination]="destination" [travelMode]="’BICYCLING’"> </agm-direction> </agm-map> How can i make agm show ..

Read more

Calling Google’s getDistanceMatrix function in service returns error cannot find undefined subscribe The following function calls the function getDistanceMatrix of googel maps that is in the service. And returns with the following error: app.component.ts calatuteRoute() { for (let i = 0; i < this.arr.length; i++) { this.GoogelMapService.distanceBetweenToPointByDrive(Destination.geometry.location.lat(), Destination.geometry.location.lng(), this.arr[i].Lat_Destination, this.arr[i].Lng_Destination).subscribe( ( ) =>{ console.log("data"); }); ..

Read more

By default the marker cluster display the number of marker in that cluster. In my code, every marker is built from an item, with the attribute lux: number. I want to display the average of lux of the markers in that cluster. Here is my code: <agm-map [latitude]="center.latitude" [longitude]="center.longitude" [zoom]="zoom" (mapReady)="onMapReady($event)"> <agm-marker-cluster [imagePath]="’assets/cluster/m’" [zoomOnClick]=true [minimumClusterSize]="10" ..

Read more