I am building an Angular Web Application using the Angular GMaps component:
<div id="map-container">
<google-map (mapClick)="mapClicked($event)">
<map-marker [position]="markerPosition" [options]="markerOptions"></map-marker>
</google-map>
</div>
Now I want to visualize multiple geoJson strings on that map.
I have seen different implementations where they have a <data-layer [geoJson]=...> component.
Is there anything similiar in the GMaps component?
@ViewChild(GoogleMap, { static: false }) map!: GoogleMap
did the trick!
this.map.data.loadGeoJson(geoJson);
now loads GeoJson on the map properly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.