-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: support satellite imagery as basemap layer #348
Merged
Merged
Conversation
This file contains 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
matthiasschaub
commented
Jan 24, 2024
… XYZ Layer to the map
…rld_Imagery to the map
matthiasschaub
commented
Feb 9, 2024
sketch_map_tool/models.py
Outdated
Comment on lines
37
to
48
class MapAttributions: | ||
def __init__(self): | ||
self.attributions = { | ||
"osm": "Powered by OpenStreetMap<br />©openstreetmap.org/copyright", | ||
"esri-world-imagery": "Powered by Esri<br />© Esri, Maxar, GeoEye, " | ||
"Earthstar Geographics, CNES/Airbus DS, USD," | ||
" USGS, AeroGRID, IGN, and the GIS User Community", | ||
} | ||
|
||
def get_attribution(self, key): | ||
if key in self.attributions: | ||
return self.attributions[key] |
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.
I suggest using StrEnum. It's more concise. Something like this:
class Attribution(StrEnum):
OSM = "Powered by OpenStreetMap<br />©openstreetmap.org/copyright"
ESRI_WORLD_IMAGERY = "..."
Attribution of a layer can then be retrived like:
Attribution(layer.key).value
… params There was a problem sending layer "ESRI:World_Imagery". Expected layername in python: esri-world-imagery Before fix: esri-world_imagery
…Switcher Control now it's possible to use an EventListener to get notified when the baselayer is switched with: layerSwitcher.on("change:activeLayer", handleLayerSwitch) This will be used to update the hidden form field with the layer information. May also be used to update the location.href in the browser bar to create a bookmarkable URL with a layer state.
…yer information to the backend
…ayer form value to it
…based on zoom and view extent
… for Esri:World_Imagery
Avoid following error related to transforming Tensor object to numpy array during marking detection: TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
matthiasschaub
force-pushed
the
wms-satellite
branch
from
February 12, 2024 11:09
6c91c48
to
d8d8474
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
add parameters to URLcloses #368