Skip to content

Instantly share code, notes, and snippets.

@ecgreb
Created September 10, 2015 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecgreb/3e465ef3fd7ae076709e to your computer and use it in GitHub Desktop.
Save ecgreb/3e465ef3fd7ae076709e to your computer and use it in GitHub Desktop.
Tangram route line test
val geometry: ArrayList<Location>? = route.getGeometry()
val mapGeometry: ArrayList<LngLat> = ArrayList()
Log.d("EraserMap", "***** Route Line START *****")
Log.d("EraserMap", "Route geometry size = " + geometry?.size())
if (geometry is ArrayList<Location>) {
for (location in geometry) {
mapGeometry.add(LngLat(location.getLongitude(), location.getLatitude()))
Log.d("EraserMap", "Adding Point: " + location.getLongitude() + ", " + location.getLatitude())
}
}
Log.d("EraserMap", "Map geometry size = " + mapGeometry.size())
Log.d("EraserMap", "***** Route Line END *****")
MapData("touch").addLine(mapGeometry)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment