{"id":32273968,"url":"https://github.com/jeremejazz/flutter_map_rastercoords","last_synced_at":"2026-02-22T03:40:29.160Z","repository":{"id":295736952,"uuid":"989694465","full_name":"jeremejazz/flutter_map_rastercoords","owner":"jeremejazz","description":"A flutter_map plugin for plain image map projection to display large images using tiles generated with gdal2tiles.","archived":false,"fork":false,"pushed_at":"2025-05-29T04:02:22.000Z","size":288,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-22T23:37:48.571Z","etag":null,"topics":["flutter","flutter-map","gdal2tiles","projections"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_map_rastercoords","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeremejazz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-24T16:23:44.000Z","updated_at":"2025-10-15T16:09:48.000Z","dependencies_parsed_at":"2025-05-27T06:19:06.591Z","dependency_job_id":"681f5d6d-557e-406d-b75d-dab6309c9cde","html_url":"https://github.com/jeremejazz/flutter_map_rastercoords","commit_stats":null,"previous_names":["jeremejazz/flutter_map_rastercoords"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeremejazz/flutter_map_rastercoords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremejazz%2Fflutter_map_rastercoords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremejazz%2Fflutter_map_rastercoords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremejazz%2Fflutter_map_rastercoords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremejazz%2Fflutter_map_rastercoords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeremejazz","download_url":"https://codeload.github.com/jeremejazz/flutter_map_rastercoords/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremejazz%2Fflutter_map_rastercoords/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T03:17:42.375Z","status":"ssl_error","status_checked_at":"2026-02-22T03:17:31.622Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-map","gdal2tiles","projections"],"created_at":"2025-10-22T23:29:09.645Z","updated_at":"2026-02-22T03:40:29.149Z","avatar_url":"https://github.com/jeremejazz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_map_rastercoords\n\nA [flutter_map](https://pub.dev/packages/flutter_map) plugin for displaying large, non-geographical images as tiled maps using a simple coordinate reference system. Tiles should be generated using [gdal2tiles](https://gdal.org/en/stable/programs/gdal2tiles.html) with the `--xyz` and `-p raster` options.\n\nInspired from [leaflet-rastercoords](https://github.com/commenthol/leaflet-rastercoords).\n\n## Features\n- Provides utilities to convert between pixel coordinates and LatLng.\n- Helper utilities for `flutter_map` setup, including:\n  - `getMaxBounds()` for constraining the map view.\n  - `zoom` property that returns the optimal zoom level based on image dimensions.\n\n\n## Usage\n\n1. Generate map tiles from your \"large\" image using [gdal2tiles.py](https://gdal.org/en/stable/programs/gdal2tiles.html)\n    ```sh\n    gdal2tiles.py --xyz -p raster -z 0-3 -w none \u003cimage\u003e \u003ctiles dir\u003e\n    ```\n2. Serve the generated tiles locally, for example using [serve](https://www.npmjs.com/package/serve) \n    ```\n    serve -l 8000\n    ```\n\n3. Add `flutter_map_rastercoords` to your `pubspec.yaml`:\n   ```yaml\n   dependencies:\n     flutter_map_rastercoords: ^0.0.1\n   ```\n4. Create a `RasterCoords` instance:\n    ```dart\n      final rc = RasterCoords(width: 1280, height: 1280);\n    ```\n\n5. Use it in your `FlutterMap`:\n   ```dart\n   Widget build(BuildContext context) {\n     return FlutterMap(\n          options: MapOptions(\n          // for non-geographical maps\n          crs: CrsSimple(),\n          // initialize with map on center\n          initialCenter: rc.pixelToLatLng(x: 1280 / 2, y: 1280 / 2), \n          // optimal zoom\n          maxZoom: rc.zoom,\n          minZoom: 1,\n          initialZoom: 1,\n            // set max bounds \n            cameraConstraint: CameraConstraint.containCenter(\n              bounds: rc.getMaxBounds(),\n            ),\n          ),\n       children: [\n         TileLayer(\n           // URL template for your locally hosted tiles\n           urlTemplate: 'http://localhost:8000/map_tiles/{z}/{x}/{y}.png',\n         ),\n       ],\n     );\n   }\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremejazz%2Fflutter_map_rastercoords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeremejazz%2Fflutter_map_rastercoords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremejazz%2Fflutter_map_rastercoords/lists"}