polyline

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

Draw Polyline from Marker on click Google Maps API v3

喜欢而已 提交于 2019-12-08 10:59:45
问题 This is a follow-up to a post I made a few days ago, in attempt to go at my challenge in a new direction. My goal is when I click on a marker, I would like the origin lat/lng of my polyline to be the same lat/lng as that marker. The trick that I am running into is where to put the line creation in my for loop of my markers where the on click exists so that the line will use the coordinates of the marker, verse the declared. Since I declare my lat/lng variables outside of this function, the

Streamlines for irregular spaced wind data in R?

北战南征 提交于 2019-12-08 09:52:28
问题 I have got wind data for some stations. The data includes station latitude, longitude, wind speed and wind direction for each station in a csv file. This data is not regularly spaced data. I have a requirement to draw streamlines for this data in R language. I tried couple of packages rasterVis for STREAMPLOT() , TeachingDemos for My.Symbols by searching through internet, however I was not successful. Here is an example plot I was talking about. http://wx.gmu.edu/dev/clim301/850stream.png

Android, google maps, polyline, shortest path

自闭症网瘾萝莉.ら 提交于 2019-12-08 09:37:10
问题 I have already read some topics on Stack Overflow but didn't found the exact solution for my problem. I will try to explain my problem. For example let say that I have a grid 9x9. The coordinates are represented by the junctions. Is there a method or did someone already implemented a procedure that draw a line from coordinate A (X, Y) to coordinate B (V, W) where the line represents the shortest path.. In my problem I am using Google Maps and I would like to draw a poly-line between

draw polyline on walked route google maps android

别等时光非礼了梦想. 提交于 2019-12-08 06:45:37
问题 i'm kind of new to android and i'm developing an app where the user walks and i want to draw a polyline while the user is walking here's what i have done so far MapClass package com.T471.stayfit; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.widget.Toast; import com

Android increase polyline width by zoom level (Google Maps V2)

落爺英雄遲暮 提交于 2019-12-08 06:43:13
问题 Is there a way how I can automatic increase and decrease the width of a polyline when I zoom in and out on Google Maps V2? It looks horrible especially on newer devices when it stays so extremely thin. But you need it that thin when zoomed out. 回答1: Save the polyline when it is added to the map. Then perform actions on the polyline. Example for saving the polyline to an arraylist when added to the map. polylines = new ArrayList<Polyline>(); protected void onProgressUpdate(PolylineOptions...

Select and Deselect Polylines in Shiny/Leaflet

佐手、 提交于 2019-12-08 05:20:40
问题 I solved my problem as Lauren. Changing styles when selecting and deselecting multiple polygons with Leaflet/Shiny The only difference is that I use polylines instead of polygons. I want to select multiple polylines und deselect them at click again. But it doesn't work..it deletes the reselected from the table but not from the map and after a line was deleted from my selected lines I can't select it anymore. Can someone help me please! Data Here is my code: library(shiny) library(leaflet)

Polylines on android map disappear when zoomed out

孤街醉人 提交于 2019-12-08 04:21:39
问题 I am using the code below to draw a bunch of vertical lines at 5 degree intervals on a Google map (android API v2). All works great until zooming out to approximately zoom level 5.1, at which point all my lines disappear. Is this a bug in my code, or something that the maps API does on purpose? How can I get these lines to show up at all zoom scales? Thanks very much. if (gMap != null) { double lat = loc_service.getLatitude(); double lng = loc_service.getLongitude(); LatLngBounds bounds = new

Swift: Draw a semi-sphere in MKMapView

强颜欢笑 提交于 2019-12-08 02:45:33
问题 I am trying to draw a semi-sphere on MKMapView knowing the center coordinates, start and end angles, and radius in nautical miles. Using this thread(How to draw UIBezierPath overlay on MKMapView?), I have subclassed MKOverlayPathRenderer to draw an arc: import UIKit import MapKit class IGAAcarsDrawArc: MKOverlayPathRenderer { let PI = 3.14159265 let radius : CGFloat = 10.0 var startAngle: CGFloat = 0 var endAngle: CGFloat = 3.14159 var latitude = 25.96728611 var longitude = -80

Google Maps Android api v2 polyline length

≯℡__Kan透↙ 提交于 2019-12-07 15:44:38
问题 I'm trying to find the android maps api v2 method that will determine the length of the polyline that I am creating while I am moving. I would put it inside onLocationChanged() for continual updates. Anyone know what the method is and what units the the maps api will display the length? Polyline line = map.addPolyline(new PolylineOptions()); public void onLocationChanged(Location location) { line.add(new LatLng(location.getLatitude(), location.getLongitude()) .width(5) .color(Color.RED)); }