Skip to content

Latest commit

 

History

History
68 lines (64 loc) · 1.55 KB

File metadata and controls

68 lines (64 loc) · 1.55 KB

PolylineOptions interface

let HND_AIR_PORT: ILatLng = {lat: 35.548852, lng: 139.784086};
let SFO_AIR_PORT: ILatLng = {lat: 37.615223, lng: -122.389979};
let HNL_AIR_PORT: ILatLng = {lat: 21.324513, lng: -157.925074};
let AIR_PORTS: ILatLng[] = [
  HND_AIR_PORT,
  HNL_AIR_PORT,
  SFO_AIR_PORT
];
let options: PolylineOptions = {
  points: AIR_PORTS,
  color: '#AA00FF',
  width: 10,
  geodesic: true,
  clickable: true
};

this.map.addPolyline(options).then((polyline: Polyline) => {
  ...
});

Interface members

Params Type Details
points ILatLng[] Pass ILatLng[] to specify the vertixes.
You need to contain two points at least.
visible boolean (optional)Set false if you want to create invisible polyline. Invisible polyline is not clickable (default true)
geodesic boolean (optional)Set true if you want to draw the curve polyline based on the earth(default: false)
color string (optional)Set the stroke color(rgb, rgba, #RRGGBB, "colorname", ...etc)
width number (optional)Set the stroke width in pixel
zIndex number (optional)Hierarchy z-index
clickable boolean (optional)Set true if you want to receive the POLYLINE_CLICK event(default: false)