Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.
This repository was archived by the owner on May 8, 2023. It is now read-only.

geojson not working #18

Description

@4F2E4A2E

Hello there, I am being able to get some geojson to run on flutter_map.

Since isolate is gone on dart2 for web and there is no other alternative form dart, I am trying to get your geojson example to run with the config: noIsolate: true [1].

Here is the log from a web run on the example:

Launching lib/main.dart on Chrome in debug mode...
Syncing files to device Chrome...
Debug service listening on ws://127.0.0.1:51030/qpXF4lT_5lk=
Debug service listening on ws://127.0.0.1:51030/qpXF4lT_5lk=
Loading geojson data
From geojson {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":9,"type":"small","name":"Sahnewal","abbrev": [..]
FEAT SINK Instance of 'GeoJsonFeature<GeoJsonPoint>' / GeoJsonFeatureType.point
[..]
FEAT SINK Instance of 'GeoJsonFeature<GeoJsonPoint>' / GeoJsonFeatureType.point
Closing
Application finished.
Flutter 1.23.0-18.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 198df796aa (4 weeks ago) • 2020-10-15 12:04:33 -0700
Engine • revision 1d12d82d9c
Tools • Dart 2.11.0 (build 2.11.0-213.1.beta)

But there is no geojson on the map. Please help out if you can spare some time.

1:

bool noIsolate = false}) async {

See also: synw/iso#3

Activity

  1. 4F2E4A2E commented on Nov 11, 2020

    @4F2E4A2E
    Author

    image

    geojson/multiPolygon

    {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "properties": {
            "stroke": "#555555",
            "stroke-width": 2,
            "stroke-opacity": 1,
            "fill": "#eb0a0a",
            "fill-opacity": 0.5
          },
          "geometry": {
            "type": "MultiPolygon",
            "coordinates": [
              [
                [
                  [
                    -71.015625,
                    53.4357192066942
                  ],
                  [
                    -105.64453124999999,
                    1.9332268264771233
                  ],
                  [
                    -28.828124999999996,
                    -15.623036831528252
                  ],
                  [
                    -1.0546875,
                    46.195042108660154
                  ],
                  [
                    -71.015625,
                    53.4357192066942
                  ]
                ]
              ]
            ]
          }
        }
      ]
    }

    geojson/polyline

    {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "properties": {
            "stroke": "#555555",
            "stroke-width": 2,
            "stroke-opacity": 1,
            "fill": "#fa0505",
            "fill-opacity": 0.5
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  -113.5546875,
                  46.800059446787316
                ],
                [
                  -65.390625,
                  -13.410994034321702
                ],
                [
                  3.1640625,
                  18.979025953255267
                ],
                [
                  11.6015625,
                  53.4357192066942
                ],
                [
                  -113.5546875,
                  46.800059446787316
                ]
              ]
            ]
          }
        }
      ]
    }

    geojson tested with http://geojson.io
    image

  2. berkayoruc commented on Dec 18, 2020

    @berkayoruc

    I have same problem and I found that all geojson features need unique "name" properties. Just try that. At least for points @X-SLAYER

  3. PavKovalenko commented on Mar 2, 2021

    @PavKovalenko

    Had similar problem. GeoJson draw only last point. Adding unique "name" property helped
    @berkayoruc Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions