google-maps-api-3

Find which tiles are currently visible in the viewport of a Google Maps v3 map

╄→尐↘猪︶ㄣ 提交于 2021-02-06 06:35:13
问题 I am trying to build support for tiled vector data into some of our Google Maps v3 web maps, and I'm having a hard time figuring out how to find out which 256 x 256 tiles are visible in the current map viewport. I know that the information needed to figure this out is available if you create a google.maps.ImageMapType like here: Replacing GTileLayer in Google Maps v3, with ImageMapType, Tile bounding box?, but I'm obviously not doing this to bring in traditional pre-rendered map tiles. So, a

Find which tiles are currently visible in the viewport of a Google Maps v3 map

佐手、 提交于 2021-02-06 06:31:34
问题 I am trying to build support for tiled vector data into some of our Google Maps v3 web maps, and I'm having a hard time figuring out how to find out which 256 x 256 tiles are visible in the current map viewport. I know that the information needed to figure this out is available if you create a google.maps.ImageMapType like here: Replacing GTileLayer in Google Maps v3, with ImageMapType, Tile bounding box?, but I'm obviously not doing this to bring in traditional pre-rendered map tiles. So, a

Find which tiles are currently visible in the viewport of a Google Maps v3 map

岁酱吖の 提交于 2021-02-06 06:31:00
问题 I am trying to build support for tiled vector data into some of our Google Maps v3 web maps, and I'm having a hard time figuring out how to find out which 256 x 256 tiles are visible in the current map viewport. I know that the information needed to figure this out is available if you create a google.maps.ImageMapType like here: Replacing GTileLayer in Google Maps v3, with ImageMapType, Tile bounding box?, but I'm obviously not doing this to bring in traditional pre-rendered map tiles. So, a

Adding google maps to my website

ぃ、小莉子 提交于 2021-02-05 12:30:52
问题 I have a page and im trying to add google map to it but it doesn't appear in the page, it has no errors in the console log but it doesn't appear in my page, here is my code: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD19cqU2rIzBHOPL_t8GhJJ9cmi-HNpULg"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script> function initialize() { var mapOptions = { zoom: 15, scrollwheel: false, center: new google.maps.LatLng((31

How to remove the international date line (IDL) and equator from Google Maps API v3?

家住魔仙堡 提交于 2021-02-05 07:32:26
问题 As per the title, I would like to remove the IDL and equator line from my map. I am using the following code: <script src="https://maps.googleapis.com/maps/api/js?key=KEY&sensor=false"></script> <script> var locations = [ ['<p>Location 1<br/> <a href="http://example.com/location1">Click here for more info</a></p>', 64.8436, -147.7231, 1], ['<p>Location 2<br/> <a href="http://example.com/location2">Click here for more info</a></p>', 33.4500, -112.0667, 2], ['<p>Location 3<br/> <a href="http:/

How do i apply this JSON to customize my Google Map

对着背影说爱祢 提交于 2021-02-04 21:00:36
问题 im trying to apply this JSON code to my Google Map: [ { stylers: [ { hue: "#ff0000" } ] } ] generated from this website: That is actually made by Google, the problem is that i dont know enought about JSON to know how i apply this code and i cant find any examples using this kind of code. Grateful for any tips or answers! :) 回答1: Yeah, I think it's not so obvious. It doesn't help that in #9 of the Wizard, they write "style" when it should be "styles". In the Hello World example ( https:/

Google Maps Directions in current traffic with waypoints

♀尐吖头ヾ 提交于 2021-02-04 19:11:14
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Google Maps Directions in current traffic with waypoints

邮差的信 提交于 2021-02-04 19:10:14
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Google Maps Directions in current traffic with waypoints

不想你离开。 提交于 2021-02-04 19:08:12
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Why is google autocomplete returning undefined when using getPlace() on the input address

让人想犯罪 __ 提交于 2021-02-02 10:01:17
问题 Why is google not returning an object with a formatted address when using auto-complete and how can I get a formatted address? When I log the variable from_place it returns an object like so: but when I log to_place it returns an object with formatted_address: I realise I'm using autocomplete on the first form and that's affecting it but how do i get to not affect or give me the formatted address? // declare variables var map, infoWindow, placeSearch, autocomplete; // autocomplete form var