
Map using Latitude/Longitude
Following is an example of a Map using Latitude/Longitude.
We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a Map using Latitude/Longitude.
Example
app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = ''; type = 'Map'; data = [ [37.4232, -122.0853, "Work"], [37.4289, -122.1697, "University"], [37.6153, -122.3900, "Airport"], [37.4422, -122.1731, "Shopping"] ]; columnNames = ["Latitude","Longitude","Name"]; options = { showTip: true }; width = 550; height = 400; }
Result
Verify the result.

angular_googlecharts_maps.htm
Advertisements