google-maps-api-3

Address geocode via jquery geocoder.geocode (400 Items)

◇◆丶佛笑我妖孽 提交于 2019-12-31 07:33:32
问题 I am trying to parse an json with 400 addresses and set map icons on each location. My problem is, that when I am looping over the items I get an error: OVER_QUERY_LIMIT. But what is the best way to set the position with the google geocode api? My function looks like this: function getAddresses(data) { var items, markers_data = []; if (data.addresses.length > 0) { items = data.addresses; for (var i = 0; i < items.length; i++) { var item = items[i] , street = item.address.street , zip = item

Google Map API v3 - Zoom parameter don't work

二次信任 提交于 2019-12-31 07:33:10
问题 I'm using an Google API v3 but this parameter 'zoom : 10' is not working. Always I call the google api, the zoom is on max and I have to click on "-" about 5 times to get the desired zoom. I tried to put zoom: 1 and zoom: 100 but nothing happens. Maybe this parameter is being overwritten, but I can't see where. Here is my code: function viewOnMap(campus_name, lat, long, address1, address2){ var locations = [ [ campus_name, lat, long, 1 ] ]; var map = new google.maps.Map(document

Google Map API v3 - Zoom parameter don't work

时光总嘲笑我的痴心妄想 提交于 2019-12-31 07:33:08
问题 I'm using an Google API v3 but this parameter 'zoom : 10' is not working. Always I call the google api, the zoom is on max and I have to click on "-" about 5 times to get the desired zoom. I tried to put zoom: 1 and zoom: 100 but nothing happens. Maybe this parameter is being overwritten, but I can't see where. Here is my code: function viewOnMap(campus_name, lat, long, address1, address2){ var locations = [ [ campus_name, lat, long, 1 ] ]; var map = new google.maps.Map(document

Google maps api V3 - Adding multiple markers dynamically from query results

喜欢而已 提交于 2019-12-31 07:31:08
问题 I'm trying to set up a map on a page with a couple of links set up underneath that when clicked, will dynamically query my database and the result set output on the map. I've spent quite a lot of time googling this but can't find quite what I'm looking for. I've got as far as using AJAX to return the lat and lon coordinates OK, but I'm going wrong when trying to create markers on the map, nothing appears though I don't generate any errors. 回答1: Code not tested, but you can do something like

Get radius while resizing circle

梦想与她 提交于 2019-12-31 06:22:29
问题 Is it possible to get the radius of an existing circle while the circle is being resized? Google maps doesn't have a "resizing" event and only triggers the radius_changed event after the user stops resizing. I figured I could get set up an interval and get the radius while the circle was being resized, but .getRadius() doesn't show the current radius until the user stops resizing. 回答1: There used to be an "article" in the Google Maps Javascript API v3 documentation that did this called "Fun

Get radius while resizing circle

夙愿已清 提交于 2019-12-31 06:21:12
问题 Is it possible to get the radius of an existing circle while the circle is being resized? Google maps doesn't have a "resizing" event and only triggers the radius_changed event after the user stops resizing. I figured I could get set up an interval and get the radius while the circle was being resized, but .getRadius() doesn't show the current radius until the user stops resizing. 回答1: There used to be an "article" in the Google Maps Javascript API v3 documentation that did this called "Fun

Google maps - draw ellipse based off 4 coordinates

情到浓时终转凉″ 提交于 2019-12-31 05:49:07
问题 I would like to draw an ellipse on google maps based off four coordinates, like the current "rectangle" method available via the API: var rectangle = new google.maps.Rectangle({ strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, map: map, bounds: new google.maps.LatLngBounds( new google.maps.LatLng(33.671068, -116.25128), new google.maps.LatLng(33.685282, -116.233942)) }); (using the bounds paramater). If that fails, is there an easy way to

googlemaps api3, demogallery example “Custom Small Navigation Control”

不羁岁月 提交于 2019-12-31 05:18:12
问题 This may not be the best place for this question but here goes: I'm a beginner in googlemaps and javascript and found this example for something I'm working on. http://search.missouristate.edu/map/mobile/examples/ZoomPanControl.htm I understand most of the code but I'm having a hard time finding out the meaning of the following lines of code at the end of this file ZoomPanControl.js window["missouristate"] = window["missouristate"] || {}; window["missouristate"]["web"] = window["missouristate

google api reverse geocode

橙三吉。 提交于 2019-12-31 05:18:06
问题 I Have a google map on my site. Users can drag the marker and the map will input the lat and lon into a form for me. See code below. I want to be able to get the address from the lat and lon and put it into my form at "locationbox". <script src="multi_step_form.js"></script> <script src="https://maps.googleapis.com/maps/api/js?callback=initMap" async defer></script> <script type="text/javascript"> var map; function initialize() { var myLatlng = new google.maps.LatLng(49.25302534866034,-102

Google Maps Api v3 - map.panTo causing “too much recursion”

倾然丶 夕夏残阳落幕 提交于 2019-12-31 04:54:10
问题 I'm having a problem finishing off my script, it works using map.setCenter to reposition on each marker, but I would like to pan to each new marker. However, when I use the panTo function the markers don't appear, although the map does show and pans around to where each new marker would be. Firebug gives me a "too much recursion" error too. Can anyone help? <script type="text/javascript"> var map = {}; var mapOptions; var infowindow; var marker; var lat, lng; var latlng; var gender; var