Questions tagged [polyline]

Polyline in computer graphics is a continuous line composed of one or more line segments.

Polyline in computer graphics is a continuous line composed of one or more line segments. You can create a polyline by specifying the endpoints of each segment.

1062 questions
12
votes
1 answer

How to show travel DIRECTION ARROW in Google Map Javascript API when using POLY LINE?

Using Google maps javascript API i want to draw arrow on top of the poly line so when the user is looking at the Map he would understand that some one traveled from here and to here. The existing functionality I want something like this Please…
Chintan Patel
  • 329
  • 2
  • 3
  • 5
12
votes
5 answers

convert bezier curve to polygonal chain?

I want to split a bezier curve into a polygonal chain with n straight lines. The number of lines being dependent on a maximum allowed angle between 2 connecting lines. I'm looking for an algorithm to find the most optimal solution (ie to reduce as…
dr jerry
  • 9,768
  • 24
  • 79
  • 122
12
votes
4 answers

Map View draw directions using google Directions API - decoding polylines

I'm trying to use the Google directions API to show directions on my mapview but I am having difficulties getting the data from the JSON response. I can get the "levels" and "points" strings but can't work out how to decode them to points on the…
Testo
  • 123
  • 1
  • 1
  • 4
12
votes
4 answers

How to create direction arrows for my polylines in Google Maps (V3)?

I have routes as Google Maps Polylines in my project (an example, http://rutasgdl.com/rutas/626-2 ) and I want to add direction arrows to the routes. I want something like this (sadly, it is for Google Maps V2)…
Jaec
  • 390
  • 2
  • 8
  • 18
12
votes
4 answers

Draw ARC Polyline in Google Map

How Can I Draw Arc Polyline in Google Map ? I already used this code to create curved Polyline. Here is the method to draw curved Polyline: private void showCurvedPolyline (LatLng p1, LatLng p2, double k) { //Calculate distance and heading…
12
votes
0 answers

How to draw a polyline with rounded ends using Google Maps iOS SDK?

I want to draw a polyline in Google Maps SDK for iOS but the ends of the line look pretty ugly to me. Is there a way I could smooth them out or round them off? I tried adding a GMSCircle to the end of the line but the circle gets zoomed in…
Balázs Vincze
  • 357
  • 1
  • 3
  • 14
11
votes
1 answer

Change Polyline Color Dynamically

I have a web app that will draw a polyline for each user (tracks movement), and I'd like to incorporate some functionality that allows the web app user to 'focus' on a certain user by changing the color of the polyline. It will have to first change…
mkyong
  • 12,497
  • 12
  • 37
  • 56
11
votes
3 answers

Svg polygon rounding

I am working on an application that is using svg move/rotate/zoom functionalities. I'm programming the back-end in Laravel and the front-end is using html/css/javascript. I've seen on the web that is possible for a polyline to have some sort of…
John doe
  • 113
  • 1
  • 1
  • 4
11
votes
4 answers

How to calculate the distance of a polyline in Leaflet like geojson.io?

I am working on a map with Mapbox and Leaflet and I am supposed to let the user draw polygons and calculate and show the are of that polygon and I also need to let the user draw a polyline and show the distance of the polyline. I have figured out…
Rohan
  • 13,308
  • 21
  • 81
  • 154
11
votes
3 answers

Draw polyline using Swift

I'm trying to get an understanding of how to draw polylines using Swift. I've looked at the documentation, referenced some tutorials, and checked out some other SO posts, but I still can't get the thing to draw a line on my map. Here's my code. …
TJ Rogers
  • 500
  • 1
  • 6
  • 19
11
votes
1 answer

leafletjs : Highlight polyline on mouseover

I have an array of polylines that displayed on a map, now what I am aiming to do is, when I hover over a certain polyline from the list, only that polyline highlights (or changes color). What I have right now is something like this (this code is…
rac3b3nn0n
  • 861
  • 2
  • 12
  • 26
11
votes
3 answers

Visvalingam-Whyatt polyline simplification algorithm clarification

I'm trying to implement a polyline simplification algorithm. The original article can be found here: http://archive.is/Tzq2. It seems straightforward in concept but I don't understand the sample algorithm (I think it's poorly worded) pseudocode…
Prismatic
  • 3,338
  • 5
  • 36
  • 59
10
votes
1 answer

Draw a line between two markers map-box react-native?

I was able to achieve creating a marker(annotation) on the map using the below code in react-native. import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View } from 'react-native'; import MapboxGL from…
Amal p
  • 2,882
  • 4
  • 29
  • 49
10
votes
2 answers

How do I add coordinates to an SVG polyline?

How do I add coordinates to an existing SVG polyline with JavaScript?
TK421
  • 801
  • 5
  • 16
  • 24
9
votes
1 answer

Android Polyline - Adding point by point

I'm currently having a map, and each 10 meters I use LocationListener to refresh my location and get the new Latitude and Longitude. Now I wish that the route the user is taking will be displayed with a red line. So everytime the OnLocationChange()…
1
2
3
70 71