Closed leodavinci1 closed 6 months ago
This is the function that I am using with the "onStyleLoadedCallback":
void _onStyleLoaded() async { LatLng? currentLocation = await _acquireCurrentLocation(); if (currentLocation != null) { setState(() { locationState = currentLocation; }); mapController.animateCamera( CameraUpdate.newCameraPosition( CameraPosition(target: currentLocation, zoom: 9.0), ), ); await initOfflineMapDownload(currentLocation); } // Fetch the transformed data List<TransformedData> dataList = await gisController.getAll(null); dataListLocal = dataList; List<GisShapesModel> allGisShapes = await gisController.getAllShapes('125', null); //Add GeoJSON sources for each shape for (GisShapesModel shapeModel in allGisShapes) { String sourceId = 'shape_source_${shapeModel.nomeShape}'; if (shapeModel.shapeJson != null) { dynamic geoJson = jsonDecode(shapeModel.shapeJson); Map<String, dynamic> jsonMap = json.decode(geoJson); await mapController.addGeoJsonSource(sourceId, jsonMap); } } // Generate CircleOptions list List<CircleOptions> circleOptionsList = generateCircleOptionsList(dataList); // Add circles to the map mapController?.addCircles(circleOptionsList); // Add labels to circles addLabelsToCircles(dataList); }
Already checked my geojson on geojson.io, it is all correct but not displaying the shape on the map.
Can someone check and help?
Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is the function that I am using with the "onStyleLoadedCallback":
Already checked my geojson on geojson.io, it is all correct but not displaying the shape on the map.
Can someone check and help?
Thanks