google-polyline

Google Maps Javascript v3 Polyline click event

风流意气都作罢 提交于 2021-01-28 12:03:59
问题 I'm trying to make display a map with a number of routes laid out as polylines. When a polyline is clicked I want to display data specific to that line. Associating data with a line isn't a problem, but no matter which line is clicked the data displayed is associated with the most recent line drawn, as if each new polyline overwrites the last. I have a database which contains a link to a gpx file, a link to a video, type of route (which indicates the colour) and some other stuff. The line is

Google geometry Api in C#

大兔子大兔子 提交于 2020-12-01 10:40:49
问题 I have a point (latitude,longitude) ex : 33.959295,35.606100 and I'm looking for a way in c# to check if this point is on a specific route (a list of points or a polyline). I did some research and I found that isLocationOnEdge function contained within the Google Maps Geometry Library does exactly what I need but it is not available for c#. Here are some examples in other languages: Google Map Javascript API https://developers.google.com/maps/documentation/javascript/geometry#isLocationOnEdge

Adding multiple Polylines on react-native-map with Google API coordinates

◇◆丶佛笑我妖孽 提交于 2020-03-28 07:05:11
问题 I want to place multiple polylines on Google maps in react-native. I'm using the react-native-maps and @mapbox/polyline for creating polylines which I imported at the top: import MapView from 'react-native-maps'; import Polyline from '@mapbox/polyline'; Here is the rest of the code: import { Marker } from 'react-native-maps'; import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View, Button } from 'react-native'; export default class consults extends Component {

Google map alternative roads show with different colour

梦想与她 提交于 2020-01-28 12:33:27
问题 I have the following google map JsFiddle - where i need to display multiple option between 2 location - what i did show only one route - need if possible 2 more to draw with different color. In documentations what i got i wasn't to clear for me to solve. $(document).ready(function(){ var markers = [ { "title": '', "lat": '56.965969', "lng": '24.143496', "description": '' } , { "title": '', "lat": '56.966259', "lng": '24.385860', "description": '' }]; var mapOptions = { zoom: 11, center: new

How to ensure that follow specific google map road while using Google Map API?

一世执手 提交于 2020-01-23 16:53:06
问题 I am trying to draw a path on roads and follow some given points.I am using Google Directions API to follow the roads.I put some markers on roads and link these points with polylines.I need to follow the red line but it follows and draws blue lines.How can I ensure this? 回答1: Verify if it is a road at all by zooming in. Also Make sure that u can tread in that direction in the road.Sometimes roads are one way, So google automatically chalks out an alternative path. Hope this helps. 来源: https:/

How to ensure that follow specific google map road while using Google Map API?

≡放荡痞女 提交于 2020-01-23 16:52:46
问题 I am trying to draw a path on roads and follow some given points.I am using Google Directions API to follow the roads.I put some markers on roads and link these points with polylines.I need to follow the red line but it follows and draws blue lines.How can I ensure this? 回答1: Verify if it is a road at all by zooming in. Also Make sure that u can tread in that direction in the road.Sometimes roads are one way, So google automatically chalks out an alternative path. Hope this helps. 来源: https:/

How to ensure that follow specific google map road while using Google Map API?

馋奶兔 提交于 2020-01-23 16:52:14
问题 I am trying to draw a path on roads and follow some given points.I am using Google Directions API to follow the roads.I put some markers on roads and link these points with polylines.I need to follow the red line but it follows and draws blue lines.How can I ensure this? 回答1: Verify if it is a road at all by zooming in. Also Make sure that u can tread in that direction in the road.Sometimes roads are one way, So google automatically chalks out an alternative path. Hope this helps. 来源: https:/

jquery-ui-map fit bounds with a polyline?

点点圈 提交于 2020-01-04 09:03:15
问题 I'm working on a mobile app using jQuery Mobile. I also you the plugin "jquery-ui-map" to do my map (that helped alot with display issues using only GMap with jQM). I'm able to add polyline on the map and it works just fine. But when I try to use the fitBounds method, it doesn't work. In fact, it zoom out alot. But not on my bounds. Here is my code : // Added some data, so you can understand the structure // of variable "plan" plan[0].lat_a = 45.4681; plan[0].lng_a = -73.7414; plan[0].lat_b =

Strange ArrayIndexOutOfBoundsException on some devices while drawing polylines

陌路散爱 提交于 2020-01-03 15:20:07
问题 Below is the code that I am using to draw routes. Whenever the user pauses the workout I want to show this path as pink polyline. I therefore made my own interface named MapHelper and taken one boolean as isPause and lastPause . When the user saves his/her workout I save all route points as array and on typical list I am displaying this maps as feeds and for that I am using lite mode version of Googlemap. Below is my adapter class Adapter.java public class FeedsAdpter extends RecyclerView

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

只愿长相守 提交于 2019-12-30 17:31:28
问题 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 ?! 回答1: Firstly you will need to calculate the middle/center of the polyline. This has been discussed and answered here; https://stackoverflow.com/a/9090409/787921 Then you will have to open the infowindow; var infowindow = new google.maps.InfoWindow({ content: "infowindow text content"}); infowindow.setPosition(midLatLng); infowindow.open(map); 回答2: find the middle