google-polyline

Event handler for editing a Google Maps Polyline?

六眼飞鱼酱① 提交于 2019-11-30 03:37:13
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 reinvent the wheel by allowing a Marker to be dragged and updating the Polyline based on where the Marker is, basically reinventing editable Polylines. I'd like to be able to add Markers, which editable Polylines do smoothly, but I have to be able to detect on drag. I can't find anything in the API documentation or on a Google search, so I thought I'd

Google map alternative roads show with different colour

风流意气都作罢 提交于 2019-11-29 17:58:58
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 google.maps.LatLng(56.975749, 24.279310), scrollwheel: false, navigationControl: false, mapTypeControl:

Drawing route on Google Maps using Google Maps Android API v2

时光毁灭记忆、已成空白 提交于 2019-11-29 15:33:50
问题 I have an app in which I am continuously tracking user's location using Google Plays new service API for Maps. I am updating the location every single second and I am also checking user activity like STILL, TILTING, IN VEHICLE, etc to get the better location tracking. I am able to draw a path using my code but it's not accurate and differs very much from the road where the user actually drives/walk. It always draws the line someway far from the actual user's path. My Service:- public class

Google Maps V3 Polyline : make it editable without center point(s)

大憨熊 提交于 2019-11-29 12:56:17
I'm struggling with Google Maps Api V3 Polylines. It is possible with this API to create user-editable shapes, as this tutorial shows for the Rectangle shape. But when I do the same with a Polyline, I have a problem with the center of the segment. In the Rectangle example, such a center point is used to extend the size of the rectangle's side. But in my Polyline, this point, when dragged, breaks the line onto two new lines. Thus, each of them gets a new center. As a consequence, instead of 2 points, I now have 5 points. And this is endless : everytime I click on a center point and I drag it,

how to draw a google maps waypoint with multi-colored polylines

房东的猫 提交于 2019-11-29 12:22:53
Hi I try to draw polylines with directions waypoints on google maps . I tried something like that. My draw I want to draw the routes with different colors like this. Google maps directions example ss I wrote this sample code . function initMap() { var directionsService = new google.maps.DirectionsService; var directionsDisplay = new google.maps.DirectionsRenderer; var map = new google.maps.Map(document.getElementById('map'), { zoom: 6, center: {lat: 41.85, lng: -87.65} }); directionsDisplay.setMap(map); calculateAndDisplayRoute(directionsService, directionsDisplay); } function

Multiple polyline to a marker on Google maps api v3

做~自己de王妃 提交于 2019-11-29 08:42:32
I am trying to direct multiple polylines to a particular marker in a map. I am able to draw the polylines to the marker but when I try to animate the same only the last polyline is working. The link below shows the map I made. http://jsbin.com/ihugur/1/edit Also this is the code: <html> <head> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBdTuWJjEUMvQZ6VVPGksE12XNgQgs__Qk&sensor=false&libraries=visualization"></script> <script

Google Map SDK: Draw correct polyline in google map as Device Moves in Background

不打扰是莪最后的温柔 提交于 2019-11-29 07:18:00
I am using Google Map SDK for iOS. I am drawing polylines in Driving mode. But when i stop,and Zoom google map then, my Current position cursor automatically moves and redraw zigzag polylines, due to that all previous polylines drawn get overlapped and polylines get completely changed.Same things happens when i go in background and drive. Could i know why is it happening? And How can I draw smooth polylines in driving and walking mode same time in same path. My Code- - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *

Event handler for editing a Google Maps Polyline?

家住魔仙堡 提交于 2019-11-29 00:33:22
问题 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 reinvent the wheel by allowing a Marker to be dragged and updating the Polyline based on where the Marker is, basically reinventing editable Polylines. I'd like to be able to add Markers, which editable Polylines do smoothly, but I have to be able to

How to dynamically add polylines from an arraylist

假装没事ソ 提交于 2019-11-28 10:28:05
I have an places = ArrayList<ArrayList<LatLng>> I am adding LatLng points into the inner ArrayList and then I have a for loop that loops and adds polylines to the map.. except it doesnt do that... How can I add polylines dynamically to the GoogleMap? I checked whether or not places was being populated and it is. Thanks in advance. ArrayList<Polyline> pl = new ArrayList<Polyline>(); for(int i =0; i<places.size(); i++){ pl.add(mMap.addPolyline(new PolylineOptions().addAll(places.get(i)))); Log.e("size of places", "size of places is " + places.size()); } Raghunandan Once you have list of latitude

Google Maps V3 Polyline : make it editable without center point(s)

ぃ、小莉子 提交于 2019-11-28 06:41:10
问题 I'm struggling with Google Maps Api V3 Polylines. It is possible with this API to create user-editable shapes, as this tutorial shows for the Rectangle shape. But when I do the same with a Polyline, I have a problem with the center of the segment. In the Rectangle example, such a center point is used to extend the size of the rectangle's side. But in my Polyline, this point, when dragged, breaks the line onto two new lines. Thus, each of them gets a new center. As a consequence, instead of 2