google-maps-api-3

How to convert address (as text) to gps coordinates?

随声附和 提交于 2020-01-01 04:18:28
问题 Let's say I have address as text: 901 Cherry Ave. San Bruno, CA 94066 USA is there any FREE service, which can help me to identify GPS coordinates (longitude and latitude) of this address? (I'll use that in my application, so it should be some kind of API) The text can be in any language. 回答1: The process is called of converting address to geographic coordinates is called geocoding . Depending on how you'll be using the data, there's an API available from Google, details here. Good luck! 回答2:

Google Maps API v3 - PHP - MYSQL

安稳与你 提交于 2020-01-01 03:44:07
问题 GOOGLE MAPS API V3 is what i'm trying to use. I have all the coordinates in mysql. I just, for example, need to take 5 listings and put them on a map but I'd like to be able to find the center point based on the multiple coordinates I'd like to display, and the zoom level as well. Yeah know? I'm having the time of my life with something that I know is terribly simple, I just can't figure this API out. I'll paypal $20 to anyone who can help me. //select * from mysql limit 5 //ok great we got 5

Show custom MapType over top of polygon overlays

最后都变了- 提交于 2020-01-01 03:41:14
问题 I've been working with Gheat to create customized heat maps as an ImageMapType. I also have a number of color-coded polygons I would like to show beneath the highlights created by the heatmap. However, the custom ImageMapType always renders below the polygons, and is obscured by them. How can I fix this? Example code below: var heatmap = new google.maps.ImageMapType({ getTileUrl: function(coord, zoom) { ... }); var mapOptions = {...}; var map = new google.maps.Map(document.getElementById("map

Google maps set different zoom based on window resize

£可爱£侵袭症+ 提交于 2020-01-01 03:30:07
问题 Following to my previous question Google maps responsive resize I would like to implement a different zoom level based on windows resize, while resizing , so if browser windows is "less than" apply x number of zooming and if "major than" apply another zooming level automatically and on the fly. The following code works perfectly in regards of recentering the map on windows resize, I need to apply the new zoom levels to it: var map; function initialize() { var mapOptions = { center: new google

Google maps - keep center when zooming

只谈情不闲聊 提交于 2020-01-01 01:52:47
问题 In Google Maps, I would like to be able to keep the center of the map on a marker on my location when I'm zooming in or out. It's something that Ingress does, it doesn't matter where you double tap (or double click) or where you pinch, the map remains centered on your marker. So it's possible... The best I came up with for now is : google.maps.event.addListener(mymap, 'zoom_changed', function() { mymap.setCenter({lat: myLoc.lat, lng: myLoc.lon}); }) But it's far from perfect, it just re

Changing google-maps polygon color/fill on click

守給你的承諾、 提交于 2020-01-01 01:11:07
问题 I have the following code which has been passed on to me and creates polygons: <script type="text/javascript"> var map; function initialize() { var myLatlng = new google.maps.LatLng(-36.42,145.710); var myOptions = { zoom: 15, center: myLatlng, mapTypeId: google.maps.MapTypeId.SATELLITE } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); // Create polygon overlays from site data in file data.js included above // Overlays are defined by a set of coordinates // We

Google Maps JavaScript API v3 directions capabilities

时间秒杀一切 提交于 2020-01-01 00:48:13
问题 I use Google Maps js API v3. I can show directions with waypoints based on this. What I want is getting the points of the direction. Lets say the direction line goes from Budapest to Warsaw. I want to get all latitude and longitude on that line. But I don't find any build in function or workaround for this. I don't copy code here as the tutorial works for me, I can start from that. (Of course it isn't a good idea to make lot of waypoints.) I've seen this question. It isn't solution for my

how to remove a single marker from google map

拟墨画扇 提交于 2019-12-31 22:43:08
问题 I am working on google maps i am trying to add markers to a google map and then tried to remove it but now as i have done both adding and removing with the code below <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>MapsApi</title> <style> #map_canvas { width: 100%; height: 500px; background-color: #CCC; } #menu_bar{ width: 100%; height: 150px; position:absolute; bottom:0px; background-color: #CCC; border-top:1px solid red; }

postcode distances using google

拥有回忆 提交于 2019-12-31 21:35:12
问题 I have a two lists of postcodes (in R)...one of children's addresses with their academic score and one of schools... i would like to be able to get the closest school for each child...so presumably a calculation of distance would been needed between postcodes by converting to long and lat values? And then I would like to be able to plot on a google map all the children per school...and see if the children who live closer to school get better grades...perhaps ploting schools a different colour

Custom routes/paths/roads on Google Maps

核能气质少年 提交于 2019-12-31 14:32:49
问题 Hey guys. I need to know if what I need is achievable. I need to be able to, using either V2 OR V3 (preferably 3), create paths which ignore buildings in a sense. I was trying to create even a kml file to draw out all of the paths myself, and then find some way to turn them on/off as needed. For example. The user wants to go from point A to point B. Between these points is a number of buildings. The user physically CAN walk through these buildings(it's a campus). I want to show them that on