google-maps-api-3

Cannot remove markers in Google Maps JS API

流过昼夜 提交于 2019-12-22 00:25:27
问题 I want to remove all markers on map when the map is clicked. I am following the documentation here: https://developers.google.com/maps/documentation/javascript/examples/marker-remove I've included the function: function clearMarkers() { setMapOnAll(null); } to be triggered by a click event, but I just get the error: Uncaught ReferenceError: setMapOnAll is not defined There is no other information in the documentation that can help me. Can anyone point me in the right direction? 回答1: The error

Google Plus 21-digit URL Number Relationship to a Google Place's ID and Reference Numbers

ε祈祈猫儿з 提交于 2019-12-21 21:39:35
问题 What is the relationship between a Google Place's ID and Reference Number and the same Place's 21-digit Google Plus number used in the Place's Google Plus URL? I want to link Google Plus URLs for 100's of different businesses to my website. However, I do not know the Google Plus URL address for each of the businesses. But I do know the Google Place ID and Reference Number for each of the businesses. Can I derive the 21-digit Google Plus Number for a business from their Google Places ID and

How to hide the Streetview street name labels on the street floor

只愿长相守 提交于 2019-12-21 21:36:24
问题 I need to get the street names (shortDescription) on street floor removed from streetview panorama: Label I want removed I know this is possible as seen on https://geoguessr.com/world/play They seem to use the same kind of json syntax as for customizing a google maps layout f=[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}], l={disableDefaultUI:!0,disableDoubleClickZoom:!0,clickToGo:!0,linksControl:!0,styles:f} But I'm not even sure these labels are actualy part of the

Not able to get optimized route from Google Direction Service api

十年热恋 提交于 2019-12-21 21:19:11
问题 I was trying to find the optimized route using google direction api by providing the waypoints.Below are the waypoints i have used statring point: LHR first waypoint: Hounslow second waypoint: harlington When I tried to find the optimized track using http://findthebestroute.com/RouteFinder.html below is the response which is the obvious answer and correct. But now i would like to perform same in my own application using directionservice api provided by google. I have prepared the above

Google map Highlight Country With Border using polygon

独自空忆成欢 提交于 2019-12-21 20:49:38
问题 I am using google map and want to highlight multiple countries using its country border lines lat lng information. I am drawing polygon but I want information for each country borders. From where can I get those information to highlight country using polygon? Or is there any other good way to highlight countries? Below link shows what I want to do.. http://www.dyngeometry.com/web/WorldRegion.aspx 回答1: Finally its done.. http://www.icgg.org/corruption.cpi_2008_worldmap.html Above link have all

Custom markers not showing on some devices (Google Maps Android SDK)

半腔热情 提交于 2019-12-21 20:44:17
问题 I have Google Maps SDK running with custom markers on an android app. Everything works fine on our test phones -- an S3, an S5 and a DROID. However, when I run the app on Nexus 5 hardware, one type of custom marker stops showing up on the map. While the markers are not showing up, they are still being drawn on the map. We can tap where the marker is supposed to be and it will perform desired behavior. We're super confused about this, especially because another custom marker (that is very

Google Maps Store Locator - modify default example

亡梦爱人 提交于 2019-12-21 20:04:12
问题 I'm trying to create a store locator based off the static csv example used by Google http://storelocator.googlecode.com/git/examples/panel.html I have recreated this example on my own server but if I edit the csv file in any way, even if I just remove some of the rows it returns a blank map. I was hoping I could use this example as a template by replacing the default values in the csv file with my own(http://storelocator.googlecode.com/git/examples/medicare.csv). There is clearly more to it

Google Map wrong marker clicked event when two markers are adjacent

让人想犯罪 __ 提交于 2019-12-21 19:47:48
问题 I have applied custom PNG images (about the same size as the default marker clusterer circle) for markers and this strange thing happened. When two markers are close (but even when they are not overlapping), I need to tap a marker twice, because the first tap wrongly gives me the previous marker. That is, There are two markers A and B close to each other. I tap A, and then I get a marker clicked event with A. Then, I tap B, but I get a marker clicked event with A. If I tab B again, then I get

Dynamically change colour of KML polygon in Google Maps API v3

ⅰ亾dé卋堺 提交于 2019-12-21 19:27:33
问题 I'm using Google Maps v3 API to load a KML layer and want to be able to change the colour of the KML from its default blue without having to edit the KML file itself. Is this possible using JavaScript or some other means? Thanks, Neil 回答1: From my understanding of the documentation, 'no', but it's not especially clear. I'm trying to do a similar thing (but update the colour of mouseover/mouseout). The KML file is loaded by the Google servers, parsed and sent along to your javascript object to

How can I combine polygons and remove the overlap?

早过忘川 提交于 2019-12-21 18:30:27
问题 I made polygons editable in Google Maps and now I can change the shape, make holes in it, combine two of more polygons to multipolygons and disaggregate them again. See http://maps.amsterdam.nl/testshape/beheer and read the Instructions in the Legenda to try it yourself. One question I can't figure out is how to combine two overlapping polygons to one polygon with no overlap. Something like this: function(path1, path2) { algorithm... return newPath; } Thank you. 回答1: Thanks a lot for the lib