Reputation: 169
I am new on Angular and I just started to developing an Angular web application using with google maps. I need to put a searchbar for autocomplate when start to write typing it should already starts to show most meaningful places. I have used some ready libraries like "@types/googlemaps" but it is not matching correctly on searching some places. Also I know google have an API for "Places search box" but it is for JavaScript. My question: -Is there any opportunity to use GoogleMaps Javascript API's in Angular 5 ?
Upvotes: 0
Views: 1098
Reputation: 5673
You can write javascript code in Angular 5. So, include Google Map's JavaScript API library in your project.
How to include Google Map's JavaScript API library?
Ans: 1. Add the JS library URL to script
array in angular-cli.json
.
script
tag in the index.html
.If you are using variables of Google Map library in service or components, declare them as below
declare var VARIABLE_NAME;
declare var map; // e.g. for map variable.
Upvotes: 1