google-polyline

Add multiple polylines to a single Array

不想你离开。 提交于 2019-12-12 00:24:40
问题 I´m new working on Maps API V3, but I can´t find a way to put multiple polylines inside one array, so I can make them show/hide with a button (all at once). This is my code. // Setup the click event listener: simply set the map to center on Bogota var bogota = new google.maps.LatLng(4.697316, -74.044805); var directionsDisplay; var directionsService = new google.maps.DirectionsService(); // FUNCION INICIALIZE function initialize() { directionsDisplay = new google.maps.DirectionsRenderer();

Encode the polyline of latitude and longitude to ascii value

隐身守侯 提交于 2019-12-11 06:46:06
问题 anyone can have code to encode the polyline(array of ) latitude and longitude value to the ascii string in java for e.g. my array was in java latlng{ {22296401,70797251}, {22296401,70797451}, {22296401,70797851} } this above value store into the List object as GeoPoint type like List<GeoPoint> polyline and want to convert into ascii string like this a~l~Fjk~uOwHJy@P I need method which accept array of latlng value and return the ascii string any help will be appreciate thanks in advance 回答1:

How to get the specific data in click of polyline?

拥有回忆 提交于 2019-12-11 05:49:35
问题 At the time of multiple data with the help of that I am plotting the polyline with lat and long value. Now when I'm plotting it, I'm to specific the line also because that the time of polyline click I should now the different because maybe the lat and long value will same but some when I will give specific value to that then I can know which lat and long is been click. PolylineOptions polylineOptions = new PolylineOptions(); polylineOptions.addAll(coordinateList); polylineOptions.width(10);

Create Elevation profile from polyline coordinate array

心已入冬 提交于 2019-12-11 01:41:34
问题 I have created a polyline using a coordinate array with code adapted from https://google-developers.appspot.com/maps/documentation/javascript/examples/polyline-simple Although the first (and probably worst) method to make the line was just a huge list of lat/lng points. Still learning the programming tricks, I apologize. Im a geographer not a programmer! I want to get the elevation from that line and create an elevation profile graph. Im new to JS and not sure how to debug whats not working.

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

半腔热情 提交于 2019-12-09 04:26:18
问题 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 ? 回答1: To draw polyline between two locations on Google Map in Swift. // Pass your source and destination coordinates in this method. func fetchRoute(from source: CLLocationCoordinate2D, to destination: CLLocationCoordinate2D) { let session = URLSession.shared let url = URL(string: "http://maps.googleapis.com/maps/api/directions/json?origin=\

Google Map API v3 example from their site doesn't work without an API key but does with a Key. What am I doing wrong?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 14:11:07
问题 Problem: I am trying to use a sample of Google Map API v3 without an API key and it doesn't render. (It does render if I use a key).Anyone know why? I decided to use this example (https://developers.google.com/maps/documentation/javascript/examples/polyline-simple) In order to make it work without a key I replaced this script: <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&signed_in=true&callback=initMap"></script> with this other script <script type="text

Polyline not visible Android Maps Api v2

强颜欢笑 提交于 2019-12-08 09:33:34
问题 I am a little bit confused since everything seems to be alright with the code. The problem is that the polyline won't show up on the map. Here is the function that I call to place polyline everytime I receive a location (I added markers in a similar way and they work great) private void addPolylineLocationOnMap(LatLng newLoc) { PolylineOptions poly = new PolylineOptions() .add(newLoc) .color(Color.BLUE) .width(5) .visible(true) .zIndex(30); googleMap.addPolyline(poly); } 回答1: A Polyline needs

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

感情迁移 提交于 2019-12-08 05:39:29
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? 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://stackoverflow.com/questions/26161459/how-to-ensure-that-follow-specific-google-map-road-while-using-google

marker with polyline while dragging the marker using leaflet

醉酒当歌 提交于 2019-12-08 02:49:32
问题 Hi I have connection between marker with polyline like this Image . I am attaching a sample here. How Can I make drag possible that when I drag the the marker with polyline. example , If I drag the marker 3 it should also update the polyline point and where ever I put the marker 3 polyline should connect with marker 3. I need this type of drag event that can update the polyline also when dragging the marker. I am using leaflet for this purpose but still unable to solve the dragging logic of

Draw google polyline with line width set in meters

天大地大妈咪最大 提交于 2019-12-07 18:14:35
问题 I noticed that when you draw a polyline in google maps you set it's width in pixels (strokewidth). Is there a way I could set that in metres instead? 回答1: Unfortunately, I don't know any easy way to do this. The API does not appear to have documentation on this and I assume this feature is unsupported. One problem is that the pixels represent a different number of meters at different zoom levels within the API. So it would be a dynamic quantity if the zoom levels are changed. One option might