google-polyline

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

时间秒杀一切 提交于 2019-11-28 05:40:44
问题 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

Multiple polyline to a marker on Google maps api v3

耗尽温柔 提交于 2019-11-28 02:15:29
问题 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

Get Array of all points of Polygon - Google Maps Drawing Tool API-3

陌路散爱 提交于 2019-11-27 21:28:06
问题 i am using Google Drawing tools for drawing polygon/rectangle on google maps, now i need to show markers that falls inside the drawn polygon and for that i am using geometry.poly.containsLocation method which takes a point(latLng) and an array of polygon points. if i use maps.polygon I can get polygon points via poly.getPath() but because i am using Google Drawing tools which uses maps.drawing.DrawingManager/google.maps.drawing.OverlayType.POLYGON so not sure how to find points here. Thanks

Confine dragging of Google Maps V3 Marker to Polyline

自作多情 提交于 2019-11-27 20:14:40
I've created a Google Map and have drawn a polyline on it. I've then added a marker to the start of the polyine (same coords as the starting coords of the polyline). What I'd like to be able to do, is grab and drag the marker but have it "stick" to the polyline such that you can only drag it along the polyline and not away or to the side of it. Is it possible to confine a draggable marker to a path in GM V3? If not, can anyone think how this might be done? There's the possibility of snapping the marker to the nearest point on the path when the user drops it, but I'd prefer a smoother "drag

How to decode the Google Directions API polylines field into lat long points in objective-C for iPhone?

早过忘川 提交于 2019-11-27 06:11:30
I want to draw routes on a map corresponding to directions JSON which I am getting through the Google Directions API: http://code.google.com/apis/maps/documentation/directions/ I have figured out how to extract the latitude and longitude from the steps field, however this doesn't follow curvy roads very well. I think what I need is to decode the polyline information, I found Googles instructions on how to encode polylines: http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html I did find some code here for Android and also Javascript on decoding the polylines, for

ios Google SDK Map cannot create dotted polylines

女生的网名这么多〃 提交于 2019-11-27 03:30:47
问题 I have called the below method to draw the dotted polylines between the markers. When it comes to the execution, it shows that only solid lines are drawn. Would you please tell me how to draw dotted lines on to Google Map ? - (void) createDashedLine:(CLLocationCoordinate2D )thisPoint:(CLLocationCoordinate2D )nextPoint: (UIColor *)colour { NSLog(@"next pt latitude %ff" , nextPoint.latitude); NSLog(@"next pt longitude %ff" , nextPoint.longitude); NSLog(@"this pt laatitude %ff" , thisPoint

Confine dragging of Google Maps V3 Marker to Polyline

百般思念 提交于 2019-11-26 20:14:47
问题 I've created a Google Map and have drawn a polyline on it. I've then added a marker to the start of the polyine (same coords as the starting coords of the polyline). What I'd like to be able to do, is grab and drag the marker but have it "stick" to the polyline such that you can only drag it along the polyline and not away or to the side of it. Is it possible to confine a draggable marker to a path in GM V3? If not, can anyone think how this might be done? There's the possibility of snapping

How to decode the Google Directions API polylines field into lat long points in objective-C for iPhone?

♀尐吖头ヾ 提交于 2019-11-26 17:34:55
问题 I want to draw routes on a map corresponding to directions JSON which I am getting through the Google Directions API: http://code.google.com/apis/maps/documentation/directions/ I have figured out how to extract the latitude and longitude from the steps field, however this doesn't follow curvy roads very well. I think what I need is to decode the polyline information, I found Googles instructions on how to encode polylines: http://code.google.com/apis/maps/documentation/utilities

Google Maps API V3: How to get region border coordinates (polyline) data? [duplicate]

蓝咒 提交于 2019-11-26 05:27:29
问题 This question already has answers here : Google has started highlighting search areas in Pink color. Is this feature available in Google Maps API 3? (2 answers) Add “Search Area” outline onto google maps result (4 answers) Closed 4 years ago . I\'m trying to get (specified) region borders as GMaps coordinates (to form a polyline) from Google Maps. Is this possible in some way? (either from maps.google.com or my own GMaps in my own domain). Note: I know you can draw/outline regions manually

Drawing Route Between Two Places on GMSMapView in iOS

时光毁灭记忆、已成空白 提交于 2019-11-26 03:50:59
问题 I am Developing an iOS Application. In that Application i am having 2 Fields From and To. I Entered Address using Google Auto Complete API.and also i am able to Getting the Latitude and Longitude of the 2 places and able to show markers on the GMSMapView . Now i Want to Draw Route Between these 2 Places. I found a solution when we use MKMapView . But i was Unable to find the solution for GMSMapView . please help me to Draw the route between these 2 points in GMSMapView . If possible please