-
-
Notifications
You must be signed in to change notification settings - Fork 888
fix: make horizontal repetition CRS dependent #1978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c06b370
fix: now works for crs with world replication or not
monsieurtanuki 1ec9e71
typo fix
monsieurtanuki 7e61d4b
functional fix
monsieurtanuki db5511e
renamed as "resolver" and removed "immutable"
monsieurtanuki 7882b07
renamed as "resolver" and removed "immutable"
monsieurtanuki e2e1e26
removed "3006"
monsieurtanuki 2abde63
Merge branch 'master' into fix/1976
JaffaKetchup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import 'dart:math'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter_map/flutter_map.dart'; | ||
| import 'package:flutter_map_example/widgets/drawer/menu_drawer.dart'; | ||
| import 'package:latlong2/latlong.dart'; | ||
| import 'package:proj4dart/proj4dart.dart' as proj4; | ||
|
|
||
| typedef HitValue = ({String title, String subtitle}); | ||
|
|
||
| class EPSG3006Page extends StatefulWidget { | ||
| static const String route = '/crs_epsg3006'; | ||
|
|
||
| const EPSG3006Page({super.key}); | ||
|
|
||
| @override | ||
| State<EPSG3006Page> createState() => _EPSG3006PageState(); | ||
| } | ||
|
|
||
| class _EPSG3006PageState extends State<EPSG3006Page> { | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Scaffold( | ||
| appBar: AppBar(title: const Text('EPSG:3006 CRS')), | ||
| drawer: const MenuDrawer(EPSG3006Page.route), | ||
| body: Stack( | ||
| children: [ | ||
| // OSM based, uses somewhat strange bounds. | ||
| // No access restrictions or fees in GetCapabilities as of 2024-10-15 | ||
| FlutterMap( | ||
| options: MapOptions( | ||
| initialCameraFit: CameraFit.bounds( | ||
| bounds: LatLngBounds( | ||
| const LatLng(61.285991891313344, 17.006922572652666), | ||
| const LatLng(61.279648385340494, 17.018309853620366), | ||
| ), | ||
| ), | ||
| crs: Proj4Crs.fromFactory( | ||
| code: 'EPSG:3006', | ||
| proj4Projection: proj4.Projection.add( | ||
| 'EPSG:3006', | ||
| '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', | ||
| ), | ||
| origins: const [ | ||
| Point(-58122915.354077406, 19995929.885879364), | ||
| ], | ||
| resolutions: const <double>[ | ||
| 4096, | ||
| 2048, | ||
| 1024, | ||
| 512, | ||
| 256, | ||
| 128, | ||
| 64, | ||
| 32, | ||
| 16, | ||
| 8, | ||
| 4, | ||
| 2, | ||
| 1, | ||
| 0.5, | ||
| 0.25, | ||
| 0.125 | ||
| ], | ||
| )), | ||
| children: [ | ||
| TileLayer( | ||
| tileBuilder: coordinateDebugTileBuilder, | ||
| urlTemplate: | ||
| 'https://maps.trafikinfo.trafikverket.se/MapService/wmts.axd/BakgrundskartaNorden.gpkg?layer=Background&style=default&tilematrixset=Default.256.3006&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix={z}&TileCol={x}&TileRow={y}') | ||
| ], | ||
| ), | ||
| ], | ||
| ), | ||
| ); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.