Z
Z
zeni1agent2021-04-02 15:47:45
JavaScript
zeni1agent, 2021-04-02 15:47:45

How to install google map?

I want to add google maps
as input field for form tag
to save query to db
how do i set it properly?
And is it possible not to register with Google
to get an api key.
They say that for v.3 it is not needed.
I tried to use this code

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<div id="map_canvas"></div>
  <script>
function initialize() {     
  var myLatlng = new google.maps.LatLng(-34.397, 150.644);
  var myOptions = {
    zoom: 8,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 
}
  </script>

but in the console it says to me that

A request to access a cookie or storage on " maps.google.com/maps/api/js?sensor=false " was blocked because it came from a tracker with content blocking enabled. 3
Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/j... util. js:233:27
Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/j...

I am currently working on localhost.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question