477 questions
4
votes
2
answers
162
views
Why does @mapbox/polyline decode differently than Google’s Routes API polyline decoder?
I have an encoded polyline string:
ivgfAw_}bNaAfMwBjZk@IUrCGlC?jBFjCDbAV~B^xBVdAJFbB~EpApClAzBfC~DfAbBvDxGFZvDxGtAzBpDbHp@hAbDdG|EhH@d@bEbGlDnFl\fi@lIfN~OlWvFbJ|BpDg@~x@bDdFtHfMvZ~f@hDvF|EzHhDxFxTj^...
1
vote
1
answer
76
views
How can I get the index of a google maps polyline path which is clicked
I have the following code to catch the polyline click
localPolyLine.addListener('click', (e) => {
});
Let's say the localPolyline has many points in it's path.
How can I get the index of the path ...
0
votes
0
answers
177
views
How do I display the result of Google's computeRoute API?
I am using the computeRoute post method provided by Google's Routes API. The method returns a JSON file with the following data :
{
"routes": [
{
"distanceMeters&...
0
votes
1
answer
339
views
How can I smoothen the line in Google Directions API?
I want to have smoother polylines displayed on the map.
See the screenshot of sharp polyline.
I found that "polylineQuality":"HIGH_QUALITY" is available in Routes Preferred API ...
1
vote
1
answer
144
views
ForegroundService gets killed because of low memory
I do not know what else I can do to prevent my app from getting killed by Android.
I cannot find the spot that leads to accumulate my memory.
In the Foregroundservice I am receiving my latitude/...
0
votes
1
answer
2k
views
How to decode a polyline and draw it on a google map using "@react-google-maps/api"
I'm trying to use the @react-google-maps/api library to render a Google map on a react component and draw a polyline on the map, however, the polyline data that comes from the backend is encoded like ...
0
votes
0
answers
161
views
Drawing multi polyline using Google Maps SDK there is cut on every joint of polyline
When I add multiple polylines using Google Maps SDK 8.1.0 in iOS, the joints of every polyline I see are cut. I want a smooth polyline at each joint as well either overlap. Here is the code and ...
1
vote
0
answers
207
views
Why is a double polyline appearing on Google Maps in Flutter instead of just one?
In my Flutter project, I've been working on drawing a polyline while updating a card. Generally, the implementation has been successful and the polyline appears as expected. However, I've encountered ...
2
votes
1
answer
976
views
How to attach a text to React Google Maps Api Polyline
In this code sample, I want to show the distance attribute on top of the PolyLine with an offset of 45% (almost next to the arrow). But I was not successful in achieving that.
<GoogleMap
id=...
0
votes
1
answer
2k
views
How to transform a google polyline string to a Set<Polyline> in flutter?
I have an API that returns an encoded polyline string and I need to show the polyline on a map.
How can I trasform the String "_p~iF~ps|U_ulLnnqC_mqNvxq`@" to a Set<Polyline> ?
...
2
votes
0
answers
788
views
Flutter Material App error on debug when switching scene
I was making 2 scene with google Maps and drawing polyline on the map, the apps have no problem running and everything working fine, however on the debug there is this big stack of error in debug ...
0
votes
0
answers
71
views
I want to find the closest path to the polyline
I need your knowledge to make my application, thanks in advance. Well, I'm using Android Studio - Java - Using the Google maps API, I generated several polylines on the map, I also added my current ...
0
votes
1
answer
186
views
Google Maps Marker (calculated with epolys.js) not on polyline if zoom
My script shows a polyline between several markers. An additional marker (green circle) should visualize the distance already travelled.
The script works, but on high zoom-levels (12-15) the marker ...
0
votes
1
answer
790
views
Polyline with routes for shorter distance Google Maps flutter
how to draw polyline (with routes, not just straight line) with google maps flutter between 2 exact points , currently there is a google api that returns directions/routes for polylines but it takes ...
0
votes
0
answers
158
views
How can I get a route given by the Directions API as a full set of LatLng pairs of coordinates?
I want to calculate the minimum distance between a point and a polyline with JavaScript and TurfJS. I can use the pointToLineDistance function for that, as follows:
var pt = turf.point([0, 0]);
var ...
1
vote
0
answers
121
views
Unable to show polyline in Google Maps Directions using react-google-maps-api
I am trying to show directions on google map. I am getting correct directions data but direction renderer only showing origin and destination markers but polyline or precisely route is missing between ...
0
votes
1
answer
97
views
how to stop animating symbol at end of polyline? [duplicate]
I'm using basic animation example from google-maps-docs.
function initMap(): void {
const map = new google.maps.Map(
document.getElementById("map") as HTMLElement,
{
center: {...
-3
votes
1
answer
154
views
How to add Multiple Polylines using Google Map JS Api while using addListeners
I am trying to add multiple polylines to the following sample and if i do so it is drawing the latest polyline and removing the old one. I know it can be done while loading the map. I have to use the ...
-1
votes
1
answer
149
views
How can I keep map labels under a Polygon in Google Maps SDK for IOS?
Is there any way to keep the map labels with street names and POIs under GMSOverlays like GMSPolygons and GMSPolylines?
I have tried with different Zindex but to no vail.
This is what I get:
But as ...
0
votes
0
answers
58
views
Draw a polyline by hand in Android
I am creating an Android app that allows user can draw a polyline by hand, I search at quite many sources, but it do not have the method that I need. So do you guys have any idea or some method to ...
1
vote
0
answers
414
views
Android: How to make Google Map Polyline smoother?
I'm using the latest Google Maps Android SDK:
implementation 'com.google.android.gms:play-services-maps:18.0.2'
This is my method for adding a Polyline to the map
return mMap.addPolyline(new ...
0
votes
1
answer
932
views
How can my android app google maps draw tracks of my movements with gps on google map sdk
I want a tracking line behind my location pointer which is moving to draw a it, so that we can see the route the person takes
enter image description here
public class Activity2 extends ...
0
votes
2
answers
2k
views
Detect user is outside the GoogleMap route (perpendicular distance to path)
I am creating a simple navigation application using GoogleMap.
When the user set the start location and destination location I am drawing the path using polylines.
If the user deviate from the path, I ...
0
votes
1
answer
189
views
How do I find a point at a given distance along a route? epoly.js is giving me extremely inaccurate and unusable results
I'm trying to find the point along a Google Maps API Directions route given a distance from the starting point. I have my code working and it gives me very accurate results most of the time. However ...
0
votes
0
answers
171
views
How to monitor enter and exit from Multiple Polylines using geofencing
I am building flutter app and wants to achieve enter and exit of user location from multiple polyline.
I wanted the fast way to know to which polyline user entered or exit from multiple polylines.
I ...
0
votes
1
answer
1k
views
React Google Maps get bounds of Polyline
I have been playing around with the Strava developer API a bit and been building a basic React app to fetch soem Starva activites and display it in a list. Repo can be found here.
I have a map that ...
-2
votes
1
answer
1k
views
Make polyline to show on google map horizontally and zoom it to center coordinate
I am using Google Maps API JavaScript. My use case is I need to plot coordinates (lat, lng) on maps (create markers) and join them through polyline. The co-ordinates will be very close to each other ...
1
vote
0
answers
75
views
React JS filter in Polyline google maps
i working in small project that use google map 90%
so in google map i would like to do a lot of polyline and filter on it .
that the issue im try to figer it right now .
any idea to help please
i ...
0
votes
0
answers
37
views
How can I plot polylines/routes on Xamarin Forms maps for a route with more than 3 destination points/ waypoints? [duplicate]
I'm new to using google maps and wanted to use the map to plot routes with waypoints (stopovers/other destinations within the route) on my map in Xamarin Forms. Well, at the moment I have managed to ...
-2
votes
1
answer
509
views
Google Map Encoded Polylines not displaying
I used to have a working Google map HTML page saved on my computer, with several years and 100's of tracks displayed with encoded polylines (GPolyline.fromEncoded).
Since Google map changes something ...
0
votes
1
answer
493
views
Getting Polyline from Firestore
Can I retrieve all the coordinates as LatLng that is stored in Firestore from different documents and use the coordinates to build a route using the Polyline in GoogleMap API. Or do I need to save it ...
0
votes
1
answer
264
views
How do I convert string from shared preferences to MutableList<LatLng> pairs to draw polylines in kotlin?
I want to convert the value from shared preferences to mutable list of LatLng pairs to draw a polylines. I dont know how to convert it. Please help.Here I get the value in shared preferences polyl as ...
1
vote
1
answer
2k
views
Problem when I draw polyline on Google maps Flutter
I am using google_maps_flutter with flutter_polyline_points packages to load google map and draw polylins between A and B points.
the map is loaded and polyline is drew between A and B correctly, but ...
1
vote
1
answer
686
views
Find out the sections where polylines overlap GoogleMap
I want to display several polylines on a GoogleMap and some of them could overlap like in the picture below. (It is possible they don't overlap perfectly).
My goal is to obtain a list of polylines ...
0
votes
1
answer
3k
views
Use current location to draw poly lines to a destination and also to add markers on google maps with markers flutter
I have an application with a google map, the application gets my current location, there are two markers on the map, one point of the marker and the polyline are coordinates passed from a previous ...
0
votes
1
answer
289
views
How to decode google polyline, when bitwise OR is destructive?
I'm looking to decode an encoded google polyline:
`~oia@
However to reverse one of the steps requires reversing the bitwise OR operation, which is destructive.
I see it's done here: How to decode ...
1
vote
1
answer
466
views
How to make a Marker traverse a Polyline in Java?
I'm working on an app, similar to uber, didi, etc. I have a problem when making the animations of the vehicles (going from point A to point B), I found this code on Internet and it works quite well:
...
1
vote
1
answer
769
views
Flutter: How to keep state of Google Maps Polylines while switching pages
I am using the Google Maps Flutter package, and my app shows the route that the user has driven with polylines. My problem is that when I change to a new page (e.g. settings page) then change back to ...
0
votes
0
answers
94
views
How to remove previously added polyline when add new polyline in google map
mapFragment.getMapAsync { GoogleMap ->
gMap = GoogleMap
val sensor = "false"
val mode = "driving"
val routeList = ArrayList<LatLng>()
...
0
votes
1
answer
274
views
Saving polylines to firebase in Kotlin?
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val mapFragment = childFragmentManager.findFragmentById(R.id.map) as ...
2
votes
1
answer
1k
views
Polylines get connected from start and end | Google Maps | Android
Problem is that when I draw polylines, they get connected from start and end point which is not supoosed to. I simply decode my polypoints (which are encoded strings from direction api) and then add ...
-2
votes
1
answer
1k
views
Javascript - Google Map multiple polylines of different colors
I am currently plotting multiple lines on a map as part of a project.
I have been able to plot multiple polylines on a Google Map with the help of a few tutorials. But, all the polylines are of the ...
0
votes
0
answers
353
views
How to solve the unstable polyline in map flutter
I want to draw the location distance on the map. Then when the user moves the location pin will also move it. I have refer this page. The problem I face is the polyline some time have come out some ...
3
votes
1
answer
5k
views
Update polyline route with user's live location flutter
When i update the polyline code, on location change method, It gives me additional straight line. I want to update my polyline when user move from one source to destination. I am able to create a ...
2
votes
2
answers
9k
views
How to show multiple sets of polylines in Flutter on one Google map
I am trying to show multiple sets of different polylines (each set represents one cycling route with its own start and endpoint).
There are ten routes in total I am bringing in from a JSON file. The ...
0
votes
2
answers
4k
views
How to draw route between multiple points in Google Maps?
I have implemented google maps in my app and there are several points i need to mark on the map. I was able to mark them with markers but the problem i am facing is trying to draw the path between all ...
0
votes
1
answer
314
views
What are these API_KEY and MAP_API_KEY in the example given in the official documentation of flutter_polyline_point
Here is the example given in the Flutter document of flutter_polyline_point
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:...
0
votes
0
answers
105
views
Multiple PolylineOptions on GoogleMap Fragment
I am trying to insert more polylineoptions in my map, I would like to put 3 conditions and based on them choose the color of the line.
With the code I have I can see the correct map portion, but it ...
0
votes
0
answers
212
views
Draw a history of roads taken that follows the roads. Google Map API ANDROID
This is my current map and what I want.
We see in blue the current lines drawn, and in red those expected.
I want the user's trips to follow the road and not get out. I have no clue on how to proceed.
...
0
votes
1
answer
959
views
Show starting and ending marker of Polyline on GMSMapView
GSMapView in iOS has different functionality to overlay the polyline on the Google map. Is there a way to show the markers at the start and end of the polyline? A Polyline has points that are nothing ...