google-maps-api-3

How can I give Google Maps API landscape a background image instead of a background color?

牧云@^-^@ 提交于 2019-12-24 22:22:09
问题 I am experimenting with Google Maps API for the first time. I have got as far as positioning and zooming the map, removing features and removing certain UI Controls. I have also managed to give the landscape a background color. { "featureType": "landscape", "elementType": "geometry.fill", "stylers": [ { "color": "#ff0000" } ] } But I would like to give the landscape a background image , rather than a background color. I can either do this directly using something like: { "featureType":

Google maps API autocomplete.getPlace() inconsistently returns geometry

寵の児 提交于 2019-12-24 21:27:09
问题 I'm using GoogleMaps Autocomplete in an AngularJS application and when I call... autocomplete.getPlace(); half the time when i try to use place it says geometry is null and half the time it works... Cant seem to figure it out...my only idea is that my code is moving on before getPlace() returns but i'm not sure how to wait for it to get done? My library include... <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=MyKey&libraries=imagery,places,geometry"> </script

Google Maps V3 StreetView not displaying on second setVisible() call

左心房为你撑大大i 提交于 2019-12-24 20:34:08
问题 EDIT: Heard back from Google, they've confirmed this is an issue on their end. EDIT2: my contact at Google has informed me they've fixed this bug. I've got a troublesome bug using the Google Maps V3 API. If you set up a map, switch to streetview, close streetview, then reopen, the imagery appears blank (though the controls still display). If you click on the controls to move the camera, the imagery returns. What causes this? As you can see the code below is very simple, I can't think where I

Incorporating JSON from Google Maps API Wizard into existing html

99封情书 提交于 2019-12-24 19:11:25
问题 I'm trying to customize the base map for a google fusion table. I'm using the Maps API Style Wizard and have created the map I want, but I'm at a loss as to how to incorporate the JSON code generated by the Map wizard into the html code for the existing page: This is the map I'd like to customize: http://shatterbe.lt/ses_maps/per_capita_upper_eastside.html And this is the code that the API Map wizard gave me: [ { "stylers": [ { "visibility": "simplified" } ] },{ "featureType": "road.highway",

Map not displaying on url

心已入冬 提交于 2019-12-24 18:16:54
问题 today i'm trying to create a google map with some data, the thing is that i'm copying/pasting the code of google maps examples, but nothing is coming... i get a blank page.... Am i that crazy? Can you please tell me what's going on? I'm using chrome and firefox.. both blank. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example:

Google Maps Polygon Incorrectly Rendered

耗尽温柔 提交于 2019-12-24 17:43:37
问题 I am trying to draw a semi-circle in google maps using Geodesics Points between 2 latitude and longitudes. I found a place that had exactly what I needed: http://maps.forum.nu/temp/gm_bearing.html It was using the API V2 and I need the V3. So I converted it. The problem im having is that the semi-circle isnt being drawn correctly and i cant figure out why. This is what happens when the semi-circle is drawn. But when I zoom out or I make the semi-circle smaller it looks fine. I have reproduced

Setting Google Map v3 size on map options

北战南征 提交于 2019-12-24 17:31:20
问题 I am trying to set up Google map (v3) inside Joomla tabs but there is display problems on map. If i move away from tab where the map is and change back map canvas is grey and map is displayed only partially on left corner of map canvas. Image with screen capture: I get this worked on other site by setting map size on map parameters but there was used Google map version 2 and i could not find correct syntax for setting map size on version 3 map. Map options are set in global variable. var

Setting Google Map v3 size on map options

会有一股神秘感。 提交于 2019-12-24 17:31:05
问题 I am trying to set up Google map (v3) inside Joomla tabs but there is display problems on map. If i move away from tab where the map is and change back map canvas is grey and map is displayed only partially on left corner of map canvas. Image with screen capture: I get this worked on other site by setting map size on map parameters but there was used Google map version 2 and i could not find correct syntax for setting map size on version 3 map. Map options are set in global variable. var

Why is “natural_feature” excluded from Google Maps Geocoding and Places API searches?

两盒软妹~` 提交于 2019-12-24 17:28:45
问题 Trying to mimic the 'what's here' feature of Google Maps in my own website but it seems that items of type 'natural_feature' are excluded from Google Maps 3 API geocoding and places searches, both nearby and radar, and also on text searches unless the EXACT name of the place is provided. This must have been an informed choice by Google to do this - anyone know the rationale, and better, offer a workaround? Seems crazy that I can't get the names of woods, nature reserves etc. any more... 回答1:

Polylines with start and end of location in Google maps v3

空扰寡人 提交于 2019-12-24 17:24:18
问题 I have drawing polylines as the following: var data = JSON.parse(data); var LineCordinates = new Array(); for (i=0; i<data.length; i++){ LineCordinates[i] = new google.maps.LatLng(data[i].fields.latitude, data[i].fields.longitude); } linePath = new google.maps.Polyline({ path: LineCordinates, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); linePath.setMap(map); } I want to place a marker at the start of the polygon line and end of the polygon line. How to do