Google Maps shows “For development purposes only”

Google Maps show the message “For development purposes only” when I try to show it in my webpage: How could I make this message go away? My code is like that: <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false”></script> <script type=”text/javascript”> function initialize() { var myLatlng = new google.maps.LatLng(50.5792659,8.6744471); var centerMap = new google.maps.LatLng(50.5792659,8.6744471); var div = document.getElementById(‘map’); } </script> Then … Read more

Google MAP API Uncaught TypeError: Cannot read property ‘offsetWidth’ of null

I’m trying to use Google MAP API v3 with the following code. <h2>Topology</h2> <script src=”https://maps.google.com/maps/api/js?sensor=false” type=”text/javascript”></script> <link rel=”stylesheet” type=”text/css” href=”{% url css_media ‘tooltip.topology.css’ %}” /> <link rel=”stylesheet” type=”text/css” href=”{% url css_media ‘tooltip.css’ %}” /> <style type=”text/css” > #map_canvas { width:300px; height:300px; } </style> <script type=”text/javascript”> var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { … Read more

Google Maps API v3: Can I setZoom after fitBounds?

I have a set of points I want to plot on an embedded Google Map (API v3). I’d like the bounds to accommodate all points unless the zoom level is too low (i.e., zoomed out too much). My approach has been like this: var bounds = new google.maps.LatLngBounds(); // extend bounds with each point gmap.fitBounds(bounds); … Read more

Auto-center map with multiple markers in Google Maps API v3

This is what I use to display a map with 3 pins/markers: <script> function initialize() { var locations = [ [‘DESCRIPTION’, 41.926979, 12.517385, 3], [‘DESCRIPTION’, 41.914873, 12.506486, 2], [‘DESCRIPTION’, 41.918574, 12.507201, 1] ]; var map = new google.maps.Map(document.getElementById(‘map’), { zoom: 15, center: new google.maps.LatLng(41.923, 12.513), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, … Read more

This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

I have a latitude, and longitude : “-27.0000,133.0000”. I want produce a map base on that. I’ve tried go to this link https://maps.googleapis.com/maps/api/geocode/json?latlng=-27.0000,133.0000&key=****** I keep getting this error on the browser { “error_message” : “This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: … Read more

Google Map API v3 — set bounds and center

I’ve recently switched to Google Maps API V3. I’m working of a simple example which plots markers from an array, however I do not know how to center and zoom automatically with respect to the markers. I’ve searched the net high and low, including Google’s own documentation, but have not found a clear answer. I … Read more

Center/Set Zoom of Map to cover all visible Markers?

I am setting multiple markers on my map and I can set statically the zoom levels and the center but what I want is, to cover all the markers and zoom as much as possible having all markets visible Available methods are following setZoom(zoom:number) and setCenter(latlng:LatLng) Neither setCenter supports multiple location or Location array input … Read more