How to get user location using GoogleMapAPI ?
events, and controls using its services and libraries. To display a map in your projects, Google Map API is used.
Note: To modify or use the above-mentioned features, the user has to get his own API KEY.
- Create your own API key by following steps in the developer’s console to access all Google Maps API. Save it in some notepad for future coding purposes.
- Refer images: Create new project for this.
Set up OAuth Client ID..
Loading of map:
<script src=”https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=initMap ”></script>
It should be included in the head section of the code, make use of the API_KEY created above.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.