Skip to content
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

Add openstreetmap as basemap. #7325

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.7.10)

- Add OpenStreetMap as a basemap option.
- [The next improvement]

#### 8.7.9 - 2024-11-22
Expand Down
14 changes: 14 additions & 0 deletions lib/Models/BaseMaps/defaultBaseMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,19 @@ export function defaultBaseMaps(terria: Terria): BaseMapJson[] {
contrastColor: "#000000"
});

baseMaps.push({
item: {
id: "basemap-openstreetmap",
name: "OpenStreetMap",
type: "open-street-map",
url: "https://tile.openstreetmap.org/",
attribution:
"© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap contributors</a>",
opacity: 1.0
},
image: "build/TerriaJS/images/openstreetmap.png",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this file be used in test/Models/BaseMaps/BaseMapsModelSpec.ts and test/Models/TerriaSpec.ts so dark-matter.png that belonged to one of the removed maps can be removed?

contrastColor: "#000000"
});

return baseMaps;
}
Binary file added wwwroot/images/openstreetmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading