question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set style polylines from shapefile

See original GitHub issue

I am loading polylines in a map from a shapefile with this code

folder: List<Overlay> = ShapeConverter.convert(mapView, File(myshape))
mapView.overlayManager.addAll(folder)
mapView.invalidate()

From How to use the osmdroid library (Kotlin) Is someone can tell me, how to style these polylines ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
samuelBarbarincommented, Jan 10, 2022

Learn a lot today, I will glad to show you my project some time

1reaction
samuelBarbarincommented, Jan 10, 2022

Thanks for the notion, pretty sure there is a neater code, but it works

val folder: List<Overlay> = ShapeConverter.convert(map, shp)
        for (i in folder.indices) {
            var ov = folder[i]
            if (folder[i] is Polyline) {
                var pl = folder[i] as Polyline
                pl.setColor(Color.LTGRAY)
                pl.setWidth(2.0f)
                map.overlayManager.add(folder[i])
            }
        }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Style line layers—ArcGIS Online Help | Documentation
Under Pattern, click the pattern to apply to the line. · Under Marker, click a line marker or select <none>. · Under Marker...
Read more >
How To: Convert shapefile polygons to polylines - Esri Support
In Template Feature Class, select the polygon shapefile. For the Has M and Has Z fields, select Same as the template feature class....
Read more >
To Create and Edit SHP Feature Line Settings | Civil 3D
Feature line settings control how feature lines, polylines, and 3D polylines in the current SHP file are configured and interpreted.
Read more >
How to add shape files to arcgis, make point, polyline and ...
In this video We will learn how to add shape files and make point, polyline and polygon features in ArcGIS.
Read more >
gsn_add_shapefile_polylines
Attaches shapefile polyline or polygon data to the given plot(s) using polylines. ... Set to True if you want the attached attributes to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found