I got this following error due to google api key not passed as parameter to the URL.
The Google allows authenticated users to access their APIs using an API key. To get started working with google maps API click the link which will guide you the process of activating it. Once you get the generated API key. You need to pass the parameter API key to the URL. The URL contained in the script tag of the source will load all the symbols and definition of the goolge maps API.
<script src="https://maps.googleapis.com/maps/api/js?v=3&key=YOUR-KEY" type="text/javascript"></script>
When you pass the input parameter longitude and latitude to the maps JavaScript the google maps API set location you want.
var latlng = new google.maps.LatLng(40.73, -73.93);
var mapOptions = {
zoom: 8,
center: latlng,
mapTypeId:google.maps.MapTypeId.ROADMAP
}
You can also refer the link how to create google map API in detail.
Post your comments / questions
Recent Article
- How to get domain name information from a Domain using Python
- ModulenotFoundError: no module named 'debug_toolbar' -SOLUTION
- How to create superuser in django project hosted in cPanel without terminal
- CSS & images not loading in django admin | cpanel without terminal
- Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
- How to sell domain name on Godaddy (2023)
- TemplateSyntaxError at / Could not parse the remainder: ' + 1' from 'forloop.counter0 + 1'
- urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0
Related Article