Closed caocuongajax closed 2 years ago
Sorry for late response I think you misconfigured the Proj4Crs.fromFactory
constructor.
You can totally remove the bounds
for testing purpose because it just protects the map to avoid network call if you are outside of bounds, however if it's misconfigured then you might not see any tiles.
You can apply later if you want: https://epsg.io/9217
Projected bounds: -174394.86 926393.71 630638.77 2589269.3
final Bounds<double> _bounds = Bounds<double>(
CustomPoint<double>(-174394.86, 926393.71),
CustomPoint<double>(630638.77, 2589269.3),
);
I don't know where did you get origins
values, but you can also omit because it just shifts the map
origins: [CustomPoint(-5122600.0, 1.00011E7)],
Here is how can you set the origin: https://github.com/fleaflet/flutter_map/blob/master/example/lib/pages/custom_crs/Readme.md
Which says basicly just use TopLeftCorner
which equals to CustomPoint(minx, maxy)
and if you have multiple layer you can provide other ones in the list.
resolutions
usually the hardest one you can read here: #2
But that trick usually works for mercator only, according to this answer: https://stackoverflow.com/questions/55837719/how-to-figure-out-resolution-array-from-user-inputted-arcgis-projection-data
you can use argis server rest endpoint to obtain your resolutions.
Hello, I have a problem with custom crs in flutter_map. Could you help me?
This is my code:
In main FlutterMap:
Layer 'OSM-WMS' is show on my application but layer ('2,3') is not. I console url that generate by WMSTileLayerOptions but BBOX is not correct. Log : 499804.8535484949, 10000988.210334396, 499804.8535484949, 10000988.210334396
In javascript project, I use proj4js and BBOX is correct. Log in javascript: 582600.854078125, 1278053.6005968752, 583345.8244375, 1278798.5709562502 This is code of javascript:
Thank you.
P/S: This is my WMS Capabilities: