google-maps-api-3

API to get all the reviews and rating from Google for business

旧巷老猫 提交于 2020-01-22 13:32:26
问题 I am using the Google Maps API to get the reviews and ratings for a company. Step 1: HTTP Request to get the reference Id. $url = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query='.<CompanyName>.'&sensor=true&key='.<apikey>; After HTTP request I am getting referenceId of business. Step 2: HTTP request to get the reviews. $url = 'https://maps.googleapis.com/maps/api/place/details/json?reference='.<referenceId>.'&key='.<apiKey> With the above, I am getting the "most helpful

Multiple Markers on Google Map: only last marker is shown

我是研究僧i 提交于 2020-01-22 02:40:08
问题 I am having a problem with displaying multiple markers on my map. The code starts by looping through an array, and then reverse geocoding the lat, lon values before displaying a marker and setting the content of the infoWindow to the returned address. My codes are below. for(var i=0; i < useNowArray.length; i++) { // plot useNow on map latlng = new google.maps.LatLng(useNowArray[i]['lat'], useNowArray[i]['lon']); console.log(useNowArray[i]['lat'] + useNowArray[i]['lon']); geocoder.geocode({

Google Maps Api v3: Info window displaying same information for all the markers on the map

孤街浪徒 提交于 2020-01-21 20:30:10
问题 I'm working on this code for a certificate program, I tried to get some help from the instructors but they don't seem familiar with Google Map Apis and the requirement is to display multiple markers from addresses stores in an XML file once a search is performed, i.e I look for John, I get his markers in addition to markers for all of the people whose address is stored and specified in my XML file. So the goal is to be able to display say 5 markers for 5 people and their respective info

Google Maps Api v3: Info window displaying same information for all the markers on the map

微笑、不失礼 提交于 2020-01-21 20:29:13
问题 I'm working on this code for a certificate program, I tried to get some help from the instructors but they don't seem familiar with Google Map Apis and the requirement is to display multiple markers from addresses stores in an XML file once a search is performed, i.e I look for John, I get his markers in addition to markers for all of the people whose address is stored and specified in my XML file. So the goal is to be able to display say 5 markers for 5 people and their respective info

Google Maps API Javascript pull data into variable from MySQL table

﹥>﹥吖頭↗ 提交于 2020-01-21 18:46:28
问题 Im working on a script that will pull a variable from my MySQL db table, heres the example coding google gives me. var beaches = [ ['Bondi Beach', -33.890542, 151.274856, 4], ]; and now here is what im trying to achieve, i have a table with the fields, ID , Beach , Long, Lat how would i replace the beach variable to pull from my MySQL table instead of having to go in and manually add the beach to the variable. That way when users add a Beach Name with longitude and latitude to the DB through

Google Maps API: Change marker animation speed

杀马特。学长 韩版系。学妹 提交于 2020-01-21 11:02:07
问题 Google Maps API v3 currently supports two types of animation for markers : DROP and BOUNCE Is there a way I can speed up the BOUNCE or slow down the DROP animation? 回答1: Google Maps API doesn't support animation properties or customization, just the ability to select "drop" or "bounce" as you said. It should be possible to apply custom animations to marker elements through jQuery or other framework. Alternatively you could supply an animated GIF as a marker. 来源: https://stackoverflow.com

Google Maps API: Change marker animation speed

断了今生、忘了曾经 提交于 2020-01-21 11:01:39
问题 Google Maps API v3 currently supports two types of animation for markers : DROP and BOUNCE Is there a way I can speed up the BOUNCE or slow down the DROP animation? 回答1: Google Maps API doesn't support animation properties or customization, just the ability to select "drop" or "bounce" as you said. It should be possible to apply custom animations to marker elements through jQuery or other framework. Alternatively you could supply an animated GIF as a marker. 来源: https://stackoverflow.com

Google Maps API: Change marker animation speed

时光总嘲笑我的痴心妄想 提交于 2020-01-21 11:01:26
问题 Google Maps API v3 currently supports two types of animation for markers : DROP and BOUNCE Is there a way I can speed up the BOUNCE or slow down the DROP animation? 回答1: Google Maps API doesn't support animation properties or customization, just the ability to select "drop" or "bounce" as you said. It should be possible to apply custom animations to marker elements through jQuery or other framework. Alternatively you could supply an animated GIF as a marker. 来源: https://stackoverflow.com

Google Map geocoder not as accurate as a Google maps

自古美人都是妖i 提交于 2020-01-21 10:04:36
问题 I have a database containing addresses that are accurate to building level. When I put these manually into Google Map's search, Google Maps finds them no problem - the markers appears right over the correct building. However, when I pass these same addresses to the Google Maps API geocoder using the below code, the markers show up only on the street and not the building. How do I increase the accuracy? HTML/PHP: <div id="addressline"><?php echo theaddress(); ?></div> JS: function

how to parse a Google Maps geocoding result

放肆的年华 提交于 2020-01-21 08:25:06
问题 I want to retrieve Geo address from given latitude and longitude using geocoding, using the given example on the site http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true I just need city name New York in this example and country name i.e United States. But the problem is there are more than one appearances of these words as long_name. My question how can I parse this json/xml in php to get just city name and country. $url= file_get_contents('http://maps