google-maps-api-3

API key invalid or not approved by Google

三世轮回 提交于 2019-12-22 10:38:17
问题 I'm currently upgrading one of my websites from the old system to HTML5 and I have some problems with the Google Maps JavaScript API v3. To fetch data from their API, you must have an key - of course - but it's here I have the problem. The problem is that even if I have an correct key that I have added on their Google APIs Console I'm getting "Permission Denied" all the time, followed by an alert window that say that I don't have an real API key or it's not approved to Google Maps JavaScript

Google Maps Address Components Geocoding vs Places API - Short vs Long Name

流过昼夜 提交于 2019-12-22 09:57:16
问题 Hey there GMaps API developers. To start - what an incredible product and service the Google Maps/JS API v3 is - thank you so much! Now, with that important bit of sincere gratitude out of the way... The short_name vs long_name options for address components is a nice feature, but for each service these two attributes mostly contain the same values, except geocode has what I would expect for short_name for both and places has what I would expect for long_name for both! *tears* Before Places

Adding thousands of Markers Google Map API V3

梦想与她 提交于 2019-12-22 09:50:16
问题 I am currently putting together a demo application that needs to show 28,000 markers on a map without using any type of clustering. The problem is, adding the marker to the map for that many takes so long that the browser crashes! Here is the current process -Retrieves map points from database including LAT and LONG (doesn't have to geocode) - for loop cycles through each of the returned values and does this: var marker = new google.maps.Marker({ position: point, animation: google.maps

Google Maps Api getting the title from the marker

半世苍凉 提交于 2019-12-22 09:47:36
问题 When I push a marker to the array it plots the marker correctly and adds a title to the array too. I know this works because when I console.log the console.log(markersArray); it returns the following. the title of the marker is next door . The below is my marker click that opens up the info window, but when I console.log out the data which is called mll it doesn't have the title inside it. google.maps.event.addListener(marker, 'click', function(mll) { console.log(mll); var html= "<div style=

JavaScript click event for any google maps markers?

久未见 提交于 2019-12-22 09:39:40
问题 I need to make something happen when any google maps marker is clicked on. Im using the demo from this link as a starting point: http://gmap3.net/examples/tags.html UPDATE - ive tried the following: $.each(markers, function(i, marker){ marker.click(function(){ alert('alert'); }); }); $.each(markers, function(i, marker){ $(marker).click(function(){ alert('alert'); }); }); UPDATE Ive tried adding this middle section to existing code: $.each(markers, function(i, marker){ marker.setMap( checked ?

How to Access a Div inside Google Maps InfoBox?

谁说胖子不能爱 提交于 2019-12-22 09:19:05
问题 I am trying to select a <div> using jquery's $('#divname') inside a infobox that Google Maps generate when any of the many markers on the map are clicked on. Problem: When I try to access the div using $("#gallery") after the marker has been clicked on, aka inside the click event listener of that marker, nothing happens. I tried getting the html contained in that div from the click listener using console.log($("#gallery").html()) and it returns null !! How can I select this div!? Click Event

Google Maps API v3 over HTTPS?

风格不统一 提交于 2019-12-22 09:13:33
问题 Is there a https version of the google maps api v3? I have a site that uses https and am getting annoying mixed secure and non-secure content errors in IE. I read that in v2 you had to pay to get this, but haven't seen anything for v3. 回答1: Update As of March 2011 The Maps API v3, Static Maps API, and Maps API Web Services are now available to all developers over https: This is one of my big problems with Google Maps. If you want to access Google Maps javascript via https you have to sign up

Google Maps Rotate Polygon

好久不见. 提交于 2019-12-22 09:09:10
问题 After drawing a Polygon shape on the map. I would like to change what direction the polygon is pointing when the map is refreshed by rotating around one of the points of the polygon. For example point the polygon in the direction of 90 degrees rotating around my first polygon point (code shown below). Can anyone provide any code examples of this working? I have seen some similar posts however examples given appear over complicated. poly = new google.maps.Polygon({ strokeWeight: 3, fillColor:

google maps api v3 rotate a polygon by certain degree

醉酒当歌 提交于 2019-12-22 08:29:49
问题 I am using google maps to allow the user to draw a polygon then using maps APIs and some sort of geometries draw the min bounded square that cover the drawn polygon at angle of 16 degree i.e. the bounded square should bound the whole polygon area AND should be rotated 16 degree with respect to y-axis. your help is highly appreciated Regards 回答1: This is a complicated problem. I can outline the steps to get you most of the way there: Solution Outline Get the map projection (map.getProjection()

How to tell KmlLayer about custom map projection?

↘锁芯ラ 提交于 2019-12-22 08:04:06
问题 I have a map with a custom projection (for maps.yandex.ru tiles) and default projection (Google and OSM tiles). When I add KmlLayer to map in the default projection it seems ok: But switching map to maps.yandex layer (in custom projection)... and kml-objects are misplaced. How do I tell KmlLayer about custom projection? 回答1: The way I understand it, any given object that has lat/lon (a,b) under a Mercator projection will have a different value than (a,b) under a custom projection. For example