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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crossOrigin option should be set to a string value like 'anonymous' or 'use-credentials', not a boolean true. While true will work as a truthy value when checked in conditional statements, it doesn't follow the standard Leaflet convention and HTML CORS attribute standards. The standard approach is to use crossOrigin: 'anonymous' to enable CORS with anonymous credentials, which will force the Origin request header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, справедливое замечание. Нет?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Иишница путает немного. Это же опция инициализации объекта тайлового слоя.
https://github.com/Leaflet/Leaflet/blob/main/src/layer/tile/TileLayer.js#L163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А. Точно. Да, она тут запутала. Аппрув я поставил.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И даже более того. Это я сослался на новую версию leaflet. А у нас 1.0.1, где вообще ТОЛЬКО boolean.
На это указывает и наш перекрытый метод
https://github.com/2gis/mapsapi/blob/master/src/DGCustomization/src/DGMobileImprove.js#L166
И в 1.0.1 ихсоднике точно так же. Так что строку тут вообще нельзя.