google-maps-api-3

Why my geocode cannot show the address

此生再无相见时 提交于 2020-01-15 11:18:11
问题 var geocoder, map, point, fmtAdd, marker; function mapLoad() { geocoder = new google.maps.Geocoder(); var myOptions = { zoom: 15, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map"), myOptions); address="W3 6BY"; if(address){geocoder.geocode({'address':address}, geocodeResult);} else{alert("Postcode Incorrect");window.close();} } function geocodeResult(results, status) { if (status == 'OK' && results.length > 0) { point

Is there a limit to how many different markers you can have in a fusion layer?

て烟熏妆下的殇ゞ 提交于 2020-01-15 11:12:12
问题 I have this implementation with fusion table layers where I try to use the pre-defined marker icons with letters A-Z to show the result of a search query on map (much like the original google maps does). The way I achieve this is by first creating a layer, with a generic icon for all markers.. var layer = new google.maps.FusionTablesLayer({ query: { select: 'Geometry', from: 0000000 }, map: map, options: { suppressInfoWindows: true }, styles: [{ markerOptions: { iconName: "measle_white" } }]

Is there a limit to how many different markers you can have in a fusion layer?

巧了我就是萌 提交于 2020-01-15 11:09:11
问题 I have this implementation with fusion table layers where I try to use the pre-defined marker icons with letters A-Z to show the result of a search query on map (much like the original google maps does). The way I achieve this is by first creating a layer, with a generic icon for all markers.. var layer = new google.maps.FusionTablesLayer({ query: { select: 'Geometry', from: 0000000 }, map: map, options: { suppressInfoWindows: true }, styles: [{ markerOptions: { iconName: "measle_white" } }]

How can I get same search result as google map

让人想犯罪 __ 提交于 2020-01-15 11:08:27
问题 When I am searching "Rudy barber Shop, New York" string in http://maps.google.com, google map showing 10 results... But When I am using google map api in my App, It only returning two results http://maps.googleapis.com/maps/api/geocode/xml?address=Rudy%20barber%20Shop,%20New%20York&sensor=false Now my question is that how can get the same result. Thanks Mandeepd 回答1: I don't think you can get exactly the same results as in Google Maps. Google Maps is a whole application . It uses multiple

Can't wait unitil results come back from google API

走远了吗. 提交于 2020-01-15 08:58:54
问题 I have Two functions : getCoordinate() and getDistance(), both need to make asynchronous request to google apis, the result is a json file, getDistance: function getDistance(origin,destination,mode) { var url="http://maps.googleapis.com/maps/api/distancematrix/json?"; var origin="origins="+origin; var destination="&destinations="+destination; var mode="&mode="+mode; var language="&language=fr-FR" var sensor="&sensor=false"; var def = new jQuery.Deferred(); var city; $.getJSON(url+origin

Can't wait unitil results come back from google API

亡梦爱人 提交于 2020-01-15 08:58:33
问题 I have Two functions : getCoordinate() and getDistance(), both need to make asynchronous request to google apis, the result is a json file, getDistance: function getDistance(origin,destination,mode) { var url="http://maps.googleapis.com/maps/api/distancematrix/json?"; var origin="origins="+origin; var destination="&destinations="+destination; var mode="&mode="+mode; var language="&language=fr-FR" var sensor="&sensor=false"; var def = new jQuery.Deferred(); var city; $.getJSON(url+origin

Google Maps v3, animating polyline between more than two points

别说谁变了你拦得住时间么 提交于 2020-01-15 05:58:19
问题 So far on my page I can animate a polyline between two points but I can't figure out how to do it for anything more than that. Example 1 setTimeout(function() { flightPath.setMap(map); flightPathProgress.setMap(map); flightPathProgress.setOptions({ strokeOpacity: 0 }); var progress = 0; var intvl = setInterval(function() { progress += 0.01; if (progress > 1) { clearInterval(intvl); running = false; } else { // animation is still running running = true; } // calculate progress var

Show info window in center of the map - Google avoid highways

谁都会走 提交于 2020-01-15 02:39:12
问题 I have a problem with Google avoid highways. When you choose youre route it writes down the directions on the side. When you click on directions they get zoomed in on the map. The problem is that they dont get zoomed in in the midlle of the map, they are zoomed in edges and corners of the map. How do i make it zoom to center? 回答1: As the issue is the same like here, the solution is also the same: Create a custom infoWindow and pass it as infoWindow-option to the directionsRenderer, then you

Show info window in center of the map - Google avoid highways

吃可爱长大的小学妹 提交于 2020-01-15 02:39:11
问题 I have a problem with Google avoid highways. When you choose youre route it writes down the directions on the side. When you click on directions they get zoomed in on the map. The problem is that they dont get zoomed in in the midlle of the map, they are zoomed in edges and corners of the map. How do i make it zoom to center? 回答1: As the issue is the same like here, the solution is also the same: Create a custom infoWindow and pass it as infoWindow-option to the directionsRenderer, then you

Google Map not showing up

懵懂的女人 提交于 2020-01-15 01:50:05
问题 I need to implement on my php page map. I have container <div id="map"></div> which is inside other div, and I put this code inside <head> tag but it doesn't show at all. Can anybody help me? <script type="text/javascript" src="javascript/jquery-1.4.3.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> (function() { window.onload = function() { var mapDiv = document.getElementById('map'); var latlng = new