google-maps-api-3

Google Maps API v3 | shows no map data

喜欢而已 提交于 2019-12-27 15:58:10
问题 i'm program a small javascript application for our local firefighter home. The application is a little like powerpoint etc. but in html. In this application i would show a google maps map with a route that shows the way from the firefighter home to the fire. I use jquery for requesting the data from the http server. My Problem is that i have inserted the code for the google maps api and the browser shows me the maps object with the google logo and so on. But there is no map, there is only a

How to set zoom level in google map

懵懂的女人 提交于 2019-12-27 13:34:42
问题 Here is the code I have written to add a marker to the google map by providing latitude and longitude. The problem is that I get a very highly zoomed google map. I have tried setting the zoom level to 1 but this has no effect to the very highly zoomed map. <script src="http://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script> <script type="text/javascript"> var icon = new google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/blue.png",new google.maps

Google Maps API V3 : How show the direction from a point A to point B (Blue line)?

天大地大妈咪最大 提交于 2019-12-27 11:54:26
问题 I have latitude and longitude for 2 points on database, I want my Google Map to display a route from point A to point B... Just like we see here (Google Maps Directions) How to draw that direction line on map ? 回答1: Use directions service of Google Maps API v3. It's basically the same as directions API, but nicely packed in Google Maps API which also provides convenient way to easily render the route on the map. Information and examples about rendering the directions route on the map can be

How to get a click event when a user clicks a (business) place on the map

被刻印的时光 ゝ 提交于 2019-12-27 11:45:17
问题 I know how to set a click event on a map, and it works fine when clicking random locations. But when I click a business place, Google Maps will display the balloon containing the information about the business, but not raise the click event to my JavaScript. You can see this happing on this geocoding demo (http://rjshade.com/projects/gmaps-autocomplete/). Browse the map to some city and click a random location: the address is displayed in the text box (Hurray!). Now find some business place

ERROR: Google Maps API error: MissingKeyMapError

情到浓时终转凉″ 提交于 2019-12-27 10:56:04
问题 The following JavaScript error suddenly appeared: Google Maps API error: Google Maps API error: MissingKeyMapError 回答1: Yes. Now Google wants an API key to authenticate users to access their APIs` . You can get the API key from the following link. Go through the link and you need to enter a project and so on. But it is easy. Hassle free. https://developers.google.com/maps/documentation/javascript/get-api-key Once you get the API key change the previous <script src="https://maps.googleapis.com

ERROR: Google Maps API error: MissingKeyMapError

核能气质少年 提交于 2019-12-27 10:54:06
问题 The following JavaScript error suddenly appeared: Google Maps API error: Google Maps API error: MissingKeyMapError 回答1: Yes. Now Google wants an API key to authenticate users to access their APIs` . You can get the API key from the following link. Go through the link and you need to enter a project and so on. But it is easy. Hassle free. https://developers.google.com/maps/documentation/javascript/get-api-key Once you get the API key change the previous <script src="https://maps.googleapis.com

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

浪尽此生 提交于 2019-12-27 10:52:20
问题 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: Learn more: https://code.google.com/apis/console", "results" : [], "status" : "REQUEST_DENIED" } But I think I

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

一个人想着一个人 提交于 2019-12-27 10:51:52
问题 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: Learn more: https://code.google.com/apis/console", "results" : [], "status" : "REQUEST_DENIED" } But I think I

Issue toggle on/off with infowindow

自闭症网瘾萝莉.ら 提交于 2019-12-26 13:50:09
问题 today i saw an answer about toggle on/off in the same button, and i decided to try to use. What i want is to click in the marker and than a infowindow appear in my map, but it doesn't work. JSFiddle simple marker with infowindow JSFiddle toogle on/off but no infowindow When i try to join(toogle with infowindow) like this: google.maps.event.addDomListener(buttonCarrosUI, 'click', function() { if(marker && marker.setMap){ if (marker.getMap() != null) marker.setMap(null); else marker.setMap(map

Google maps API infowindow showing only last statement from array

孤街醉人 提交于 2019-12-26 08:51:45
问题 I have this code. Adding Markers work great but right infowindow to markers don't.. (title in marker too) It's returning only last statements from array infoUser for all markers. I know.. I'm duplicating a question but I tried fix it with a lot of answered questions but it doesn't work. function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 3, center: {lat: 49.7437895, lng: 15.3360726} }); //array var infoUser = [ ['Germany','Maj','TUC','20','300'], ['Czech