Closed ghost closed 4 years ago
Hello, Thank you for your feedback. Which version of itowns did you use ?
Hello, I use the very last one: 2.22.0
I think that may be the issue. Our tutorial is indeed based on v2.9.0 (which was the current version when it was written) and the API changed since then. If you check out to that version it should work. Let us know if it doesn't.
If you want to use a more recent version of itowns, the code we provide in the tutorial would have to be adapted. You can use itowns doc to do that: http://www.itowns-project.org/itowns/docs/#home (note that they also propose two tutorials that are up to date with the last version). If you do so, don't hesitate to propose a pull request with the modifications you had to make to our tutorial :)
I followed this tutorial but I've got this error: "Invalid crs parameter value 'WGS84' ". I've changed for 'EPSG:4326'. I've got this error this time: "New WMTSSource: projection is required". I don't think it's a problem of version. I'm lost. I don't know how to do.
I found a solution:
"https://github.com/iTowns/itowns/issues?page=2&q=is%3Aissue+is%3Aopen" here.
We need to modificate this line
var position = new itowns.Coordinates('WGS84', 2.35, 48.8, 25e6);
by this: var position = new itowns.Coordinates('EPSG:4326', 2.35, 48.8, 25e6);
Add in orthoSource:
var orthoSource = new itowns.WMTSSource({ projection: "EPSG:3857"
and in elevationSource:
var elevationSource = new itowns.WMTSSource({ projection: 'EPSG:4326'
Thanks for this proposition! I modified the tutorial with your proposition in #65 .
Don't hesitate to open an other issue (or pull request) if you find other issues or corrections that should be made.
Hello, I followed the tutorial. But I don't know why it doesn't work. I've got this mistake: "Error: New WMTSSource: projection is required".