title: How to extract point coordinates of lines from MGLShapeSource in Mapbox Swift
body: <p>I plot lines correctly on a Mapbox iOS map using a geojson files I have created.
  I read the geojson file and associate it to a shape like so:<br />
  <code>shapeFromGeoJSON = try? MGLShape(data: jsonData, encoding: String.Encoding.utf8.rawValue)</code></p>
  <p>Then I create a linesSource and a linesLayer and then I show the linesLayer  on the map correctly:</p>
  <p><code>linesSource = MGLShapeSource(identifier: &quot;polyline&quot;, shape: shapeFromGeoJSON, options: nil)</code></p>
  <p><code>linesLayer = MGLLineStyleLayer(identifier: &quot;polyline&quot;, source: linesSource)</code></p>
  <p><code>mapView.style?.addSource(linesSource)</code></p>
  <p><code> mapView.style?.addLayer(linesLayer)</code></p>
  <p>Inside the geojson file, each line is represented by a &quot;geometry&quot; with multiple &quot;coordinates&quot; of type &quot;LineString&quot;.</p>
  <p>I need to do some special processing that involves knowing all the coordinates of the points making the lines.</p>
  <p><strong>Question</strong>: how can I get all the multiple point coordinates of each LineString from linesSource?</p>
  <p>Here's my geojson file for testing:</p>
  <pre><code>{
    &quot;features&quot;: 
  
      {
        &quot;type&quot;: &quot;Feature&quot;,
        &quot;properties&quot;: {},
        &quot;geometry&quot;: {
          &quot;coordinates&quot;: [
            -9.316333,
            38.680709
          ],
          &quot;type&quot;: &quot;Point&quot;
        },
        &quot;id&quot;: &quot;1234&quot;
      },
      {
        &quot;type&quot;: &quot;Feature&quot;,
        &quot;properties&quot;: {},
        &quot;geometry&quot;: {
          &quot;coordinates&quot;: [
            [
              -9.31687,
              38.680772
            ],
            [
              -9.317531,
              38.679794
            ],
            [
              -9.318001,
              38.679196
            ],
            [
              -9.318436,
              38.678612
            ],
            [
              -9.318592,
              38.678354
            ]
          ],
          &quot;type&quot;: &quot;LineString&quot;
  
        },
        &quot;id&quot;: &quot;567&quot;
      },
  
  
  
      {
        &quot;type&quot;: &quot;Feature&quot;,
        &quot;properties&quot;: {},
        &quot;geometry&quot;: {
          &quot;coordinates&quot;: [
            -9.316057,
            38.680838
          ],
          &quot;type&quot;: &quot;Point&quot;
        },
        &quot;id&quot;: &quot;89&quot;
      },
  
  
  
      {
        &quot;type&quot;: &quot;Feature&quot;,
        &quot;properties&quot;: {},
        &quot;geometry&quot;: {
          &quot;coordinates&quot;: [
            -9.316719,
            38.680715
          ],
          &quot;type&quot;: &quot;Point&quot;
        },
        &quot;id&quot;: &quot;1011&quot;
      },
  
  
  
  
      {
        &quot;type&quot;: &quot;Feature&quot;,
        &quot;properties&quot;: {},
        &quot;geometry&quot;: {
          &quot;coordinates&quot;: [
            -9.315931,
            38.681066
          ],
          &quot;type&quot;: &quot;Point&quot;
        },
        &quot;id&quot;: &quot;1213&quot;
      }
    ],
    &quot;type&quot;: &quot;FeatureCollection&quot;
  }
  </code></pre>