Thanks to visit codestin.com
Credit goes to github.com

Skip to content

No line-join or line-cap with controller.addLineLayer on iOS #461

@mindthefish

Description

@mindthefish

When drawing a line onto the map as a line layer from a GeoJSON with MultiLineString geometry, the parameters for line-join and line-cap are not being applied on iOS, they work fine on Android. As far as I know this issue also applies to a simple LineString.
Is this a known problem?

Here is how I apply the GeoJSON:

Map<String, dynamic> featureCollection = {
      'type': 'FeatureCollection',
      'features': [
        {
          'type': 'Feature',
          'properties': {},
          'geometry': {'type': 'MultiLineString', 'coordinates': [[[lon1, lat1], [lon2, lat2]], [[lon3, lat3], [lon4, lat4], [lon5, lat5]]]}
        }
      ]
    };

String geojson =  jsonEncode(featureCollection);

final color = Color(0xFF008AA8);

mapController.addSource(sourceId, geojson)
mapController.addLineLayer(
    sourceId,
    layerId,
    {
      'line-width':
          '["interpolate", ["linear"], ["zoom"], 10.0, 10.0, 20.0, 20.0]',
      'line-color': '["rgb", ${color.red}, ${color.green}, ${color.blue}]',
      'line-cap': 'round',
      'line-join': 'round'
    },
    beforeId: myBeforeId);

Line drawing on Android:
Screenshot 2020-11-18 at 14 39 48

Line drawing on iOS:
Screenshot 2020-11-18 at 14 46 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions