google-maps-api-3

How to obtain dynamic google map url of a specific map (I have static map url)

社会主义新天地 提交于 2019-12-24 03:26:14
问题 I have the below static google map url. just want to know the equivalent for dynamic map. Static Google Map URL I am not sure if it is v2 or v3. 回答1: Replace center by q and just swap the base URLs: http://maps.googleapis.com/maps/api/staticmap?center=Brooklyn%20Bridge,New%20York,NY&zoom=14&size=512x512&maptype=roadmap%20&markers=color%3ablue|label%3aS|40.702147,-74.015794&markers=color%3agreen|label%3aG|40.711614,-74.012318%20&markers=color%3ared|color%3ared|label%3aC|40.718217,-73.998284

Google Maps: Norwegian postcodes not returning any results

吃可爱长大的小学妹 提交于 2019-12-24 03:18:48
问题 Putting it simply, we have some Norwegian postcodes and are using the API to get their addresses and lat & long. Nothing to highbrow, but on around 10% of the postcodes. The API returns no results, here's an example: Success for postal_code=1151 : http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:1151&sensor=false Fail for postal_code=2066 : http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:2066&sensor=false I have noticed

Add onclick listener to Google Maps Markers JavaScript

瘦欲@ 提交于 2019-12-24 03:15:07
问题 I wrote this code: <script type="text/javascript"> var address = JSON.parse('<?php echo $jsonLocations ?>'); console.log(address.locations[0]); var latitude = '1'; var longitude = '1'; function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 12, center: new google.maps.LatLng(latitude, longitude) }); for(var i = 0; i < address.locations.length; i++){ new google.maps.Marker({ position: new google.maps.LatLng(address.locations[i]['lat'], address.locations[i][

Does a Google Map element have to be in the DOM when instantiating?

无人久伴 提交于 2019-12-24 02:57:06
问题 I am instantiating a Google Map object like so: this.map = new google.maps.Map(this.el, { center: new google.maps.LatLng(this.lat, this.lng), mapTypeId: google.maps.MapTypeId.ROADMAP, zoom: this.zoom }); Where this.el is an object created via document.createElement('div') but has not yet been inserted into the DOM. When I later append this.el to the DOM I get a map that looks like this (note all the weird gray space): http://cl.ly/3B3z1e3g2h1U301r0X1R I do not have this problem, though, if I

Trying to display Google Maps Directions with Geolocation, and user input, using meteor. Everything but the actual directions work

牧云@^-^@ 提交于 2019-12-24 02:14:18
问题 So I'm still relatively new to Meteor, and this will be my first Meteor project using an external API, and I'm running into a few issues. I've made web apps using the maps api before, and have had no problem displaying directions, but for some reason I'm having a lot of issue with Meteor. I have no problem getting the map to actually display a users current position, and map styling is the way I want it, but when it comes to the part where the user inputs directions, nothing happens. The map

Remove “Sign In”-marker from Google Maps V3

大兔子大兔子 提交于 2019-12-24 02:08:52
问题 I develop an application with a very prominent Google Map. The "Sign In"-marker at the top right is distracting for the user, as my application has its own "Sign In". Is it allowed and possible to remove that?! Adding disableDefaultUI: true does not help. 回答1: This is because you include the Google Maps script with signed_in=true parameter. Just replace : <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script> by <script src="https://maps.googleapis.com/maps/api

select2 not working when in google maps fullscreen

江枫思渺然 提交于 2019-12-24 02:03:08
问题 I have a google map that a user can go into fullscreen mode. I add a div with a dropdown as controls to the map and I apply the select2 plugin to the dropdown. The problem is the select2 dropdown doesn't show the list when the map is in fullscreen mode, when the map is not in fullscreen mode the dropdown works correctly. There are no errors in the console. I tried changing the z-index but had no luck. Any ideas? JSFiddle Example HTML <div id="wrapper"> <div id="testMap"> </div> <div id=

select2 not working when in google maps fullscreen

笑着哭i 提交于 2019-12-24 02:01:15
问题 I have a google map that a user can go into fullscreen mode. I add a div with a dropdown as controls to the map and I apply the select2 plugin to the dropdown. The problem is the select2 dropdown doesn't show the list when the map is in fullscreen mode, when the map is not in fullscreen mode the dropdown works correctly. There are no errors in the console. I tried changing the z-index but had no luck. Any ideas? JSFiddle Example HTML <div id="wrapper"> <div id="testMap"> </div> <div id=

what is the best geocode to get long and lot for a street address? [closed]

故事扮演 提交于 2019-12-24 01:37:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . i have street addresses in the format of 1 Rue du Four, 60200 COMPIEGNE, France 2 Rue de Lancry, 60200 COMPIEGNE, France And the list of address can be up to 100 000. hundred thousand. currently i am using google gecode but it has limitations like per day 2500. i kept on getting this error. google.maps

Google Map API v3 - Centre Map on Markers

北城以北 提交于 2019-12-24 00:59:17
问题 I've recently started using Google Maps API v3. I need to plot some locations (maybe 3 or 4) and at the same time, centre the map on these points - as opposed to manually having to set the long and lat for the map to centre on... Can someone share some tips, or point me in the right direction? Thanks in advance! Dan function initialize() { var latlng = new google.maps.LatLng(51.50816, 0.02712); var myOptions = { zoom: 12, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var