google-maps-api-3

Autofill Address + Google Maps API

我与影子孤独终老i 提交于 2019-12-29 10:36:09
问题 I want to present my users with a text box wherein they can type in their address. As they type their address, I want to provide the users with suggestions/predictions of what address they are trying to type. I'm also concerned about the relevance of this address (e.g. that the address is not an address halfway across the world). Is this possible? I'm using jQuery. 回答1: You can use Google Places API to have an autocomplete for address. When address is selected, address_components field

Clickable Driving Direction on Google Maps v3

廉价感情. 提交于 2019-12-29 09:26:07
问题 I'm making a google maps project and need to create a route clicking on it. My project has 2 points that has a predefined lat and lng, and I want to draw by myself the start and the end of the point A and B and don't lose it functionality. I made another project that you can click to draw the route but it don't have markers, and is not draggabble, this is my actual project with the full code I will post here a short code only with my directions. I want that my first click to the point A and

How to make a dashed curved polyline in Google Maps JS API?

此生再无相见时 提交于 2019-12-29 08:58:13
问题 I have a created a dashed polyline, and a curved polyline, can I make the dashed line curve, or the curved line dashed? http://jsfiddle.net/stevenmc/re6km2wp/ var map; var curvature = 0.5; // how curvy to make the arc function init() { var Map = google.maps.Map, LatLng = google.maps.LatLng, LatLngBounds = google.maps.LatLngBounds, Marker = google.maps.Marker, Point = google.maps.Point; // This is the initial location of the points // (you can drag the markers around after the map loads) var

Polymer 3 - Google Maps

对着背影说爱祢 提交于 2019-12-29 08:54:29
问题 I would like to know how to include Google Map in Polymer 3. I have just upgraded to Polymer 3 from Polymer 2. This is my sample that is not working base of the starter-kit import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; import '@em-polymer/google-map/google-map.js'; import '@em-polymer/google-map/google-map-marker.js'; import './shared-styles.js'; class MyView1 extends PolymerElement { static get template() { return html` <style include="shared-styles"> :host {

How can i capture the click event when a default marker/place is clicked on googlemaps?

旧时模样 提交于 2019-12-29 08:37:17
问题 I am working with Google Maps API V3. The googlemaps displays markers for some places/location by default, I need to capture the click event when one of them is clicked.. I have tried to use the click event of the map but it not works because the user is clicking the marker not the map, code is given: google.maps.event.addListener(mymap, 'click', function () { alert('clicked'); }); Can someone give me an idea how to do it? EDIT: I can find no suitable Event in the available Events, which can

Geochart fill countries with unique colors and show country names with its color as legends [closed]

ⅰ亾dé卋堺 提交于 2019-12-29 08:23:02
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . i need to fill each countries with unique color specified in a list and display country name and its color as legend below of the map.as shown in images attached with this.any help will be appreciated. <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts

Google Maps API get place text like on iframe map

自作多情 提交于 2019-12-29 08:15:48
问题 So I have found a couple of ways to get maps onto my page, the first version is by using an iframe like so: <iframe src="https://www.google.com/maps/embed/v1/place?key=[APIKEY]&q=place_id:[PlaceID]"></iframe> which gives a marker like the following image with the name of the place next to the marker: However, this isn't perfect as it has that massive white box in the top left and according to many SO posts, you are unable to remove it. So I thought I would try the js route so have the

How can I display country borders, US state borders, and city borders using Google Maps?

我的未来我决定 提交于 2019-12-29 07:12:27
问题 I am using Google Maps v3 and I need to add border lines for different areas to my map. For example, in Google Maps all the US State borders are shown automatically. I need to do the same thing for different countries. For example, show all the city boundaries in England. How i can do this with Google Maps API v3? Regards, Yossi 回答1: You can use the KML support that is provided in Google Maps, learn more by reviewing the KML Introduction, and then create v3 KmlLayer. The Lat-Lng coordinates

Google Map V3 .png groundoverlay opacity

这一生的挚爱 提交于 2019-12-29 07:12:13
问题 I have created my first Google Map API with png overlays (thanks to @andresf for assistance). This map has multiple png ground overlays adjacent to each other and can be seen at http://www.earthstation.mobi/coverage.htm Question: How do I set the opacity (transparency?) on each overlay so that I can see the map detail under the overlay? I do not need to adjust this from the webpage, a preset coded into the script will suffice. The code of the page listed above is: <!DOCTYPE html "-//W3C//DTD

Google Maps random vertical line in Chrome

霸气de小男生 提交于 2019-12-29 06:38:07
问题 I am implementing google maps on my website and I just started noticing this line appearing. It only happens in Chrome (Windows) and no matter how far I step back in my code I can't seem to make it disappear. As you zoom out, the line randomly renders elsewhere in the viewport, generally on the right side. Any thoughts on what may be causing this? Here is the CSS I have applied to the map_canvas: #map_canvas img { max-width: none!important; } #map_canvas { height: 100%; width: 100%; position: