Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 870 Bytes

README.md

File metadata and controls

31 lines (25 loc) · 870 Bytes

MapCircle

The MapCircle component wraps the google.maps.Circle class from the Google Maps JavaScript API.

Example

// google-maps-demo.component.ts
import {Component} from '@angular/core';
import {GoogleMap, MapCircle} from '@angular/google-maps';

@Component({
  selector: 'google-map-demo',
  templateUrl: 'google-map-demo.html',
    imports: [GoogleMap, MapCircle],
})
export class GoogleMapDemo {
  center: google.maps.LatLngLiteral = {lat: 24, lng: 12};
  zoom = 4;

  circleCenter: google.maps.LatLngLiteral = {lat: 10, lng: 15};
  radius = 3;
}
<!-- google-maps-demo.component.html -->
<google-map height="400px" width="750px" [center]="center" [zoom]="zoom">
  <map-circle [center]="circleCenter" [radius]="radius" />
</google-map>