Questions tagged [google-polyline]

Google Polyline class in Google Map v3

A polyline is a list of points, where line segments are drawn between consecutive points.

481 questions
49
votes
13 answers

How to decode the Google Directions API polylines field into lat long points in Objective-C for iPhone?

I want to draw routes on a map corresponding to directions JSON which I am getting through the Google Directions API: https://developers.google.com/maps/documentation/directions/start I have figured out how to extract the latitude and longitude…
Alan Moore
  • 6,525
  • 6
  • 55
  • 68
34
votes
12 answers

Drawing Route Between Two Places on GMSMapView in iOS

I am Developing an iOS Application. In that Application i am having 2 Fields From and To. I Entered Address using Google Auto Complete API.and also i am able to Getting the Latitude and Longitude of the 2 places and able to show markers on the…
Suresh Peddisetti
  • 3,782
  • 3
  • 23
  • 26
34
votes
1 answer

Google Maps API V3: How to get region border coordinates (polyline) data?

I'm trying to get (specified) region borders as GMaps coordinates (to form a polyline) from Google Maps. Is this possible in some way? (either from maps.google.com or my own GMaps in my own domain). Note: I know you can draw/outline regions manually…
20
votes
2 answers

Google Maps API v3 SVG markers disappear

I am using SVG path notation to create markers along with a polyline using Google Maps API v3. Sometimes, after adding a few markers, they just stop showing from the map. If I pan the map, even just 1px, they show again. SVG markers stop showing…
MrUpsidown
  • 21,592
  • 15
  • 77
  • 131
16
votes
1 answer

Event handler for editing a Google Maps Polyline?

I'm looking for an event that fires while you are editing a Polyline in Google Maps, similar to the 'drag' event on Markers. I've found the 'capturing_changed' event, but it seems to fire on dragstart and dragend, not on drag. As is I'm having to…
14
votes
2 answers

Polyline encode gets wrong lat/lng after decoding

We are using Google's Polyline decoding algorithm to decode our coordinates. But in our case the most coordinates are wrong after decoding it. We have also tested the process with a deeper precision. This is our code and also our logs to test that…
TJR
  • 6,307
  • 10
  • 38
  • 64
13
votes
4 answers

Touch detection on polyline in Google Maps Android API v2

I want to implement a touchListener on a polyline displayed with Google Maps V2 Android API. Zoom level: CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(lat_Lng, 5); I tried the following polyline touch code: boolean onpoly = false; …
harikrishnan
  • 1,985
  • 4
  • 32
  • 63
13
votes
2 answers

Confine dragging of Google Maps V3 Marker to Polyline

I've created a Google Map and have drawn a polyline on it. I've then added a marker to the start of the polyine (same coords as the starting coords of the polyline). What I'd like to be able to do, is grab and drag the marker but have it "stick" to…
Brad Barrow
  • 1,036
  • 10
  • 18
10
votes
4 answers

Merging multiple encoded polylines into one encoded polyline

I'm trying to merge a new encoded polyline with an existing polyline without decoding and reencoding the whole polyline. The new encoded polyline will be uploaded to a (linux) server where I would like to append it to the existing polyline. The…
Dan Mandle
  • 5,608
  • 3
  • 23
  • 26
10
votes
5 answers

How to draw routes between two locations in google maps iOS swift

I'm using google maps in my iOS swift project. I want to draw a path between two locations on the map (Not straight line). Any idea how to do that ?
Anushka Madushan
  • 681
  • 2
  • 12
  • 31
10
votes
2 answers

How to show Traffic layer on top of Directions polyline in google maps API

I am using the Javascript API to show a google map with directions (based on user input) along with the traffic layer. it works well, but i cannot figure out a way to show the traffic colors on the relevant polylines above my custom created line.…
kob490
  • 3,177
  • 4
  • 25
  • 40
10
votes
3 answers

Google maps: Live drawing and updating a Polyline

I'm really newbie in JS, so sorry, that I have no my code attached, 'cause all what I did - "helloworld" examples from Google Map Docs. So, what's a problem: I want to draw a polyline depending on user's current position. So, each one…
Rachnog
  • 353
  • 1
  • 7
  • 18
9
votes
4 answers

How to buffer a polyline in Android or draw a polygon around a polyline?

I am trying to put a buffer around a polyline in MapsV2 for android but I haven't find how to do it yet, I was thinking on drawing a polygon around the polyline but also haven't found anyone that have done that, is it possible?
9
votes
1 answer

How to increase mouseover “hit area” in polyline geomap

I'd like to show and hide a tooltip when mouseover / mouseout on the polyline path, the issue is that my polyline path has a stroke width 2 only, so is not easy to hit that area in the mouseover event, that's definitely inconvenient to user…
Shinoj
  • 811
  • 2
  • 8
  • 18
8
votes
3 answers

How to put a infowindow on polyline in Google Maps v3?

I want to know how to show infowindow on polyline in using Google Maps Api V3? and to appear in the middle of the polyline ?!
Bader
  • 3,656
  • 9
  • 38
  • 55
1
2 3
31 32