google-maps-api-3

Trying to get Google Maps fitbounds to work

五迷三道 提交于 2019-12-25 08:56:39
问题 Am playing with Google Maps V3 API and StyledMarkers. The data is derived from a PHP/MySQL query returning several hundred points. The code below returns everything I need and works fine EXCEPT for getting it to zoom to an approriate level (which in this case I know is 10). <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><?php echo returnval("event_name","events",$_GET['eid']); ?>

google maps Uncaught TypeError: Cannot read property 'start_location' of undefined in google maps

℡╲_俬逩灬. 提交于 2019-12-25 08:36:50
问题 Hi I have this simple function in JS for google maps and I get uncaught typeerror directionResult is google directions response object which is passed by other function to this function. var myRoute = directionResult.routes[0].legs[0]; var warnings = document.getElementById("warnings_panel"); for (var i=0;i<3;i++) { warnings.innerHTML += "<br/><br/>start lat = " + myRoute.steps[i].start_location.lat() + "start lng = " + myRoute.steps[i].start_location.lng() + "<br />"; warnings.innerHTML +=

fusiontable table format

白昼怎懂夜的黑 提交于 2019-12-25 08:30:27
问题 I have a excel sheet which has around 5000 rows in it.I have used JavaScript API to view the location coloumn in my webpage.User can also query the results from my webpage using SQL API.Now I want to display those query results not only in map also as a table in my webpage.How to do it? 回答1: Use the Visualization API. 回答2: I believe the Visualization API has a 500 row limit. Another alternative is to use Fusion Table's JSONP support. I posted some example code in these SO answers: https:/

Specific way of selecting a location on a google map

早过忘川 提交于 2019-12-25 08:18:16
问题 I've inherited a small project. The person before me created a native app for iPhone, implemented in objective-c, and my job is to remake it as a webapp with PhoneGap for iOS and Android. In my predecessor's original implementation, part of the app has the functionality of allowing the user to drop a marker on a map to select a location. I found a comparable way of doing this, but the supervisor wants the exact way she'd done it , which I'm having a little trouble with. Let me describe: In

Fusion Table + Google Maps

浪尽此生 提交于 2019-12-25 08:14:36
问题 So I have a fusion table and I can map it out. However, I'd like to know how to make it so that if I click on a specific page, the map will just show that specific place. To make it clearer, it's similar to what Yelp is doing. So if I search a local business, and I see the page, Yelp have that business on Google Map, zoomed in. Another example: http://alamatku.com/direktori/united-parcel-service-inc-ups) - Here you can see that the map is specifically located for UPS. I'd like to do something

Google Maps hide controls on small screens

荒凉一梦 提交于 2019-12-25 08:14:36
问题 I want to hide Google Maps controls on small screens. By default Google Maps hides them at 320px width i think, but i need them to hide on bigger width, around 400px. Here is one working example, but i am using different code so it is not working, i just get syntax errors. Here is my code: var map = new google.maps.Map(document.getElementById('map-canvas'), { center: { lat: 52.00, lng: 10.00 }, zoom: 4, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_TOP }, mapTypeControl:

Programmatically Polling Google Maps Quota Usage

陌路散爱 提交于 2019-12-25 08:11:23
问题 Is there any way to programmatically poll the maps API for quota usage? i.e. I would like to know when I'm approaching the daily limit without having to manually view it in a console. I would love to have a script run once an hour and alert me if I'm using X% of the quota. Thanks! 来源: https://stackoverflow.com/questions/41659261/programmatically-polling-google-maps-quota-usage

suppressMarkers and draggable for DirectionsRendererOptions Google Maps API

一笑奈何 提交于 2019-12-25 08:04:56
问题 I'm using Google Maps API to create a direction with the given points. I need to order the points as 1,2,3...99 (It's done). Also the points must be draggable. But when I make the points draggable, the direction does not refresh itself, point's locations change but not the direction, Here is the sample code(taken from the --> Google Maps Directions using 1-2-3 instead of A-B-C); <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google

two different google streetviews

匆匆过客 提交于 2019-12-25 08:02:48
问题 I am getting two different streetviews, and I'm wondering if anyone can help me understand why the difference occurs. I start on google maps and zoom into the streetview with the following URL: https://www.google.com/maps/place/452+42+Ave+SE/@51.0445,-114.059,3a,75y,346.38h,85.83t/data=!3m4!1e1!3m2!1smwjybt0aGjulRlrUl7QyMg!2e0!4m7!1m4!3m3!1s0x53717001e51c622d:0xe4cc541a8bac14f6!2s219+9+Ave+SE!3b1!3m1!1s0x0:0x22eaf82b58b21f94 I then extract the latitude and longitude and generate the following

Google places AutoComplete hide key

匆匆过客 提交于 2019-12-25 07:59:43
问题 I have a grails application. In my gsp page when I have the line <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=myKey"></script> My key is exposed, is there a way to hide this in the gsp? I could restrict the domain for my production, but currently the application is being tested in my local machine alot, and because of that each PC's ip has to be added. I'm assuming there should be a smarter & easier way to handle this. 回答1: There is no way to hide this