google-maps-api-3

Determining the Place according to latitude and longitude

不羁的心 提交于 2019-12-25 03:57:15
问题 I'm using google maps API to determine a building(Place) which is a Google Point of interest. I'm trying to get the place reference for future use. but due to API limitation or whatever limitation. I can't get the exact place. As an example below latitude longitude belongs to "The university of Sydney". Using this code I could derive University of Sydney but as second result and also I tried many lat long but sometime appropriate result comes in the end or first. These places are prominent to

Update Markers using Dropdown without reloading google map

此生再无相见时 提交于 2019-12-25 03:55:22
问题 Hello everyone through this script I am loading all the markers in map after that I have 5 dropdowns on top of my page , Initially i have loaded all markers from database now i want to filter markers on the basis of selected dropdown how i can do please suggest something thank you in advance check this image for more clarity Here is my script to load google map <script language="javascript" type="text/javascript"> var pubvar1 = 0; var pubvar2 = 0; var locations = []; // these things i am

Removing an individual marker from Google Map - API v3

一笑奈何 提交于 2019-12-25 03:49:13
问题 I want to remove an individual marker from Google map. I am using version 3 API. I know how I can remove all the markers by maintaining a markerArray and setting map null for all. For removing one by one, I am thinking to make a key value pair combination. So that I give a key and remove the particular marker. I need help over this. Following is the code, that I use to dram marker: function geoCodeAddresses(data) { var markerInfo = {addressKey: '', marker:''}; for (var i = 0; i < data.length;

Google maps image marker is not placing correctly in the sprite

☆樱花仙子☆ 提交于 2019-12-25 03:46:15
问题 I'm trying to use a sprite image for google map marker but it does not display. Here is the code I'm using function setMarkers(map, markers) { var google_image = new google.maps.MarkerImage("http://www.mydomain.com/images/bodycss/pointer.png", new google.maps.Size(32, 32), new google.maps.Point(28, 32)); for (var i = 0; i < markers.length; i++) { var sites = markers[i]; var siteLatLng = new google.maps.LatLng(sites[1], sites[2]); var marker = new google.maps.Marker({ position: siteLatLng, map

Autocomplete Google Maps Place by Cities

左心房为你撑大大i 提交于 2019-12-25 03:36:45
问题 I have a problem with the autocomplete places of Google maps, I want to restrict the results by cities such as Miami, and show only places from Miami, I try using longitude and latitude, but not every city has a regular area 回答1: try by zipcode, get a list of zipcodes by city.. query the db for zipcodes within that city. then you could use a joined query to get the markers based on those zip codes. 回答2: The docs for Autocomplete in the Places API indicates that there is a bounds option and

Convert lat,lng into Address and show on infoWindow google map api

最后都变了- 提交于 2019-12-25 03:36:09
问题 I have list of lat, lng values in object var path = [{"lat":"12.9247903824","lng":"77.5806503296"},{"lat":"10.9974470139","lng":"76.9459457397"}] Here i have to convert latlng into address and have to show marker and infowindow. Address have to be shown in info window I have tried this one, i have getting address and multiple markers but i not able to show address on info windows.. last infowindow only showing address for (var i = 0; i < path.length; i++) { var pos = new google.maps.LatLng

Need to add 45+ points to a google map

孤街醉人 提交于 2019-12-25 03:21:54
问题 trying to add 45 different points to a map, but I just get OVER_QUERY_LIMIT returned, and no map. I am getting locations via a string search, then assigning the returned LatLng object to a new google Marker object String Search var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': x}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { var result = results[0].geometry.location; return result; } else { alert("Geocode was not successful for the

Google API--KMZ File Not Appearing in Web Map

微笑、不失礼 提交于 2019-12-25 03:16:45
问题 I am attempting to get a KMZ file to load ontop of a Google Map API and the KMZ file is not appearing. Below is my code and everything executes properly when I load the HTML--the KMZ file is just missing. I tried to minimize the size of the file by converting only one feature layer vs the entire map document to KMZ but I had the same problem. Ideas? <!DOCTYPE html> <html> <head> <title>Map Title, USA</title> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAx70- gnDWt1nCCf

Can't click point from KML if inside Polygon

不想你离开。 提交于 2019-12-25 03:13:32
问题 Hi all This is the scenario: Have a KML layer with points of data, with description, if you click on marker it will popup description. KML layer added via: geoxml= new google.maps.KmlLayer('http://MYRURL',{preserveViewport:true}); geoxml.setMap(map); Have a polygon made with coords array directly on map with poly = new google.maps.Polygon({ paths: polyCoords, strokeColor: "#0000FF", strokeOpacity: 1, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.2 }); Problem: I can click (Green Arrow

How to keep a reference of marker in iOS Google Maps

ぐ巨炮叔叔 提交于 2019-12-25 03:01:22
问题 So according to the documentation, I need to keep a reference to the marker. Right now, in my viewWillDisappear method I'm trying to clear one of the pins off the map but it's not working. Maybe it's because I don't have a reference to it? If so, how does that work? (By the way, I couldn't get it to work as a part of any other method as well, not just viewWillDisappear .) I have the latitude and longitude of the marker and here's what I'm doing now: CLLocationCoordinate2D position =