google-maps-api-3

CodeIgniter + Google Maps API V3 + close InfoWindow()

六月ゝ 毕业季﹏ 提交于 2019-12-23 03:25:30
问题 Anyone have an idea how to make the CodeIgniter Google Maps API v3 library only allow a single info window to be open, and also to make it hide thei nfo window when clicking outside of the info window. Library: http://www.in-the-attic.co.uk/2010/08/03/google-map-library-for-codeigniter-example-usage-update/ 回答1: If you want only one info window to display at a time (as this is the behavior of Google Maps), you should create only one instance info window. Hope it helps 回答2: I ended up using a

Google maps api 3 with places DEMO works only in Chrome… why?

老子叫甜甜 提交于 2019-12-23 03:24:30
问题 There's a lot of Google Maps API Places info on here already, but here's a demo which show a lot of what many people seem to be having problems with, sadly though it only works in Chrome (at least not in Firefox or IE). http://gmaps-samples-v3.googlecode.com/svn/trunk/places/2012-may-hangout/search.html Can anyone explain why? it has a lot of unnecessary things like animated dropping of markers, but has a really good example of the difference between google.maps.places.RankBy.DISTANCE; and

Accessing Coordinates in a nested geojson file to draw polygons with Google Maps API v3

混江龙づ霸主 提交于 2019-12-23 03:21:37
问题 I am having a real pain of trying to draw multiple polygons from a geojson file. Below I have pasted a sample of the geojson file and the javascript used to access it. It seems the main problem I am running into is that I cannot get into that array of coordinates nested in each record as it either returns the error that "coordinates" is undefined or that there is no method "setMap" for undefined. I have been able to return other nested aspects of a similar JSON file (this is a test file, the

Accessing Coordinates in a nested geojson file to draw polygons with Google Maps API v3

时光总嘲笑我的痴心妄想 提交于 2019-12-23 03:21:14
问题 I am having a real pain of trying to draw multiple polygons from a geojson file. Below I have pasted a sample of the geojson file and the javascript used to access it. It seems the main problem I am running into is that I cannot get into that array of coordinates nested in each record as it either returns the error that "coordinates" is undefined or that there is no method "setMap" for undefined. I have been able to return other nested aspects of a similar JSON file (this is a test file, the

How to “generate” unique variables?

折月煮酒 提交于 2019-12-23 03:18:10
问题 I'm currently working on a Google Map, and now I want to "generate" pins from an API. But then I get stuck, because a pin looks like this: var imageDriver = 'marker.png'; var DriverLatLng = new google.maps.LatLng(location.lat, location.lng); var driverMarker = new google.maps.Marker({ position: DriverLatLng, map: map, icon: imageDriver, title: drivers[0].name }); } I want to create a function of some sort that could "generate" these variables with a prefix. Check an example below: var

Changing from Google maps api v2 to v3

梦想的初衷 提交于 2019-12-23 03:13:35
问题 I've been using Google geocoding v3 for about 6 months but all of a sudden it's stopped working (I get a 610 error). It's only stopped in the last week or so. Then I came across this (see the pink box at the top of the page!): https://developers.google.com/maps/documentation/geocoding/v2/ I've read through all the documentation and not sure where to start! I'm hoping it's a small change as it's taken a long time to get this far, can anyone help? [See the full site here][1] UPDATE: require(

Android - How to show nearby user markers?

北城以北 提交于 2019-12-23 02:50:54
问题 I have an android app where users can register and when they are logged in their location is visible by markers on the map as shown in this Image. But I just want to show only nearby marker within 100 meters. Please help me up with exact coding section and all the object initialization. Here is my code for fetching all user markers(lat,lng) from database: private void getNearbyMarkers(){ geoFireRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange

Closest of a list of addresses from a location

我是研究僧i 提交于 2019-12-23 02:43:09
问题 does anyone know how i can return a googlemap with pins for every location within a set radius. Don't necessarily need a specific distance from potential plotted route. I want the user to be able to specify their address (postcode) and a set distance (10,20,50 miles) and then i can show these results on a map. I have the list of postcodes, held in my database, do i need to generate something like a kml? Cheers Tim 回答1: This sounds like a classic Store Locator application, which is a bit

Errors When Calculating Distance Between Two Addresses

爷,独闯天下 提交于 2019-12-23 02:41:17
问题 I have the following script which is being used in a spreadsheet to calculate the driving distance between two cities or a city and a zip code of another city. It is being run for approximately 25 locations simultaneously. To better explain, I have cell B3 in which I enter a new city every time. The script is then used in cells adjacent to my 25 plant locations to calculate the distance from each of my plants to the variable city. It uses google sheets built in mapping api and works on 80% of

Google Maps Draw Route malfunction in Windows

*爱你&永不变心* 提交于 2019-12-23 02:35:09
问题 tldr: recently, my use of the Google Maps JavaScript API v3 does not show routes or markers anymore. It works fine on my Debian-box, but not on any Windows computer I tried (ranging XP to Windows 8). Has there been a recent change in the API? Is my code buggy? see http://pastebin.com/ubRGPtDZ Dear All, in August 2014, I wrote a Qt program that at some stage shows Google Maps in a QWebView . Through JavaScript I was able to draw a route. This program has been functioning fine, up to mid