I'm trying to replace a region of my map, structured in p-gmap, with a more up-to-date photo of the same region. I would like to know how to do this.
My map in HTML:
<p-gmap
(onMapClick)="addMark($event)"
(onOverlayClick)="handleOverlayClick($event)"
(onOverlayDragEnd)="onOverlayDragEnd($event)"
[overlays]="overlays"
[options]="options"
[style]="{ width: '100%', height: '70vh' }"
></p-gmap>
And I created a class for the image of the region I want to update, it's called OrigemOrtofoto:
export class OrigemOrtofoto
{
idOrigem: number;
latInfEsq: number;
lngInfEsq: number;
latSupDir: number;
lngSupDir: number;
urlImage: string;
}
As noted, it has 4 coordinates, which form a region, and I want to replace this region on the map with the photo that is stored in the class in the urlImage field.