google-polyline

Google Maps for iOS, swift - How to show entire polyline between markers?

半腔热情 提交于 2019-12-19 07:50:49
问题 I am trying to fit a polyline in the google map view. The polyline was acquired through overview_polyline in the google maps directions api. Wondering how I would be able to convert an encoded polyline into something that can be worked with. I need to fit the polyline in the map view. All i have found out to do is fit the bounds to show all markers but not showcase the entire polyline. func fitAllMarkers() { var bounds = GMSCoordinateBounds() for marker in markers { bounds = bounds

Merging multiple encoded polylines into one encoded polyline

…衆ロ難τιáo~ 提交于 2019-12-18 15:46:58
问题 I'm trying to merge a new encoded polyline with an existing polyline without decoding and reencoding the whole polyline. The new encoded polyline will be uploaded to a (linux) server where I would like to append it to the existing polyline. The problem is, you can't just mash them together. Below is some sample data to play with. My hope is to find/create a solution in either PHP or a shell script but the problem is, I have no where near enough technical understanding to interpret the encoded

How to buffer a polyline in Android or draw a polygon around a polyline?

≡放荡痞女 提交于 2019-12-18 05:52:29
问题 I am trying to put a buffer around a polyline in MapsV2 for android but I haven't find how to do it yet, I was thinking on drawing a polygon around the polyline but also haven't found anyone that have done that, is it possible? 回答1: Do you want to draw Path on the map or Do you want to draw straight lines on the map. In both cases you can follow below code PolylineOptions polyLineOptions = new PolylineOptions(); ArrayList<LatLng> points = new ArrayList<>(); //Code to populate Latlng

How to buffer a polyline in Android or draw a polygon around a polyline?

本小妞迷上赌 提交于 2019-12-18 05:52:04
问题 I am trying to put a buffer around a polyline in MapsV2 for android but I haven't find how to do it yet, I was thinking on drawing a polygon around the polyline but also haven't found anyone that have done that, is it possible? 回答1: Do you want to draw Path on the map or Do you want to draw straight lines on the map. In both cases you can follow below code PolylineOptions polyLineOptions = new PolylineOptions(); ArrayList<LatLng> points = new ArrayList<>(); //Code to populate Latlng

MVC Google Map Polylines

有些话、适合烂在心里 提交于 2019-12-14 03:14:57
问题 I'm trying to create a Google Map that will draw out a race course from a list of lat & lng in my MVC model. I have successfully done this with markers but I need to do it with polylines to create a path of the course. Below is what I have but can't get the lines to show up. Any suggestions? <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=false"></script> <script> function initialize() { var mapOptions = { zoom: 10, center: new google.maps.LatLng(@Model.Courses.Latitude

need to remove last polyline and create current polyline

不羁的心 提交于 2019-12-13 16:48:07
问题 i do google map with google direction i use class http://www.akexorcist.com/2015/12/google-direction-library-for-android-en.html that someone build for google direction. everything is work good, and the polyline show on the map. but when i need to click another direction like walking direction or drive direction i see 2 polyline on the map and i want to see only the current polyline. here i create the polyline and remove the polyline in the start, then the polyline not show at all. i dont

How to add polylines with an array of position?

折月煮酒 提交于 2019-12-13 09:22:32
问题 I have a simple array containing name of cities. I'm trying to loop through this array and add markers linked by Polylines on the Google Map. Here is my code: function addMarkerCity(cities) { $.each(cities, function(index, value) { geocoder.geocode({'address': value}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var cityPosition = results[0].geometry.location; flightRoute.push(cityPosition); var currentMarker = map.addMarker({ position: cityPosition }); }); }); }

Plotting multiple polylines on Google Maps

偶尔善良 提交于 2019-12-13 08:04:21
问题 I'm new to programming with Javascript and Google Maps so this may be a pretty simple question. I would like to plot multiple polylines on a Google Map. I have code written that draws the lines but they are all connected instead of discrete. I've tried implementing several solutions I found here but either the map doesn't display at all or else it does and the polylines are all still connected. See the attached image of the flawed result. Does anyone have any suggestions to correct this

Save a route and conserve its curvature with Python OSMnx

橙三吉。 提交于 2019-12-13 04:43:19
问题 With OSMnx, I would like to be able to save a path with its curvature as the image below shows. import osmnx as ox import networkx as nx # Download the road network G = ox.graph_from_place('Monterey, California', network_type='drive') # Starting and ending point of a trip start = [36.580665,-121.8297467] end = [36.594319,-121.8727587] # Retrieve nearest node orig_node = ox.get_nearest_node(G, start) dest_node = ox.get_nearest_node(G, end) # Compute the path of the trip route = nx.shortest

Calculating value of Levels when merging encoded polylines

人盡茶涼 提交于 2019-12-12 23:49:18
问题 This is a follow-up question to Merging multiple encoded polylines into one encoded polyline. So through the last question/post I was able to work through finding out how to join polylines, however, now I need to figure out how to do the same for the levels. Using the same sample as before: 41.386692,-73.475912 41.424822,-73.375027 41.428292,-73.311173 41.426183,-73.254577 41.470168,-73.218532 41.498865,-73.155278 First 3 levels: PIP Second 3 Levels: PIP All 6 levels: PIGJIP How are these