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

Finish MapLibre migration #51

Merged
merged 1 commit into from
Sep 20, 2024
Merged
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 .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ What issue is this PR targeting?
- [ ] If there are any visual changes as a result, include before/after screenshots and/or videos
- [ ] Add #fixes with the issue number that this PR addresses
- [ ] Update any documentation for affected APIs
- [ ] Update the CHANGELOG
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Version 0.1.0 - 2024-09-21

This project has migrated from Stadia Maps to the MapLibre organization!
To celebrate, we're bumping the version and adding a CHANGELOG.

Xcode and GitHub normally handle these sorts of changes well,
but sometimes they don't.
So, you'll probably want to be proactive and change your URLs from
`https://github.com/stadiamaps/maplibre-swiftui-dsl-playground`
to `https://github.com/maplibre/swiftui-dsl`.

If you're building a plain Xcode project, it might actually be easier to remove the Swift Package
and all of its targets and then re-add with the URL.

Swift Package authors can simply update the URLs.
Note that the package name also changes with the repo name.

```swift
.product(name: "MapLibreSwiftDSL", package: "swiftui-dsl"),
.product(name: "MapLibreSwiftUI", package: "swiftui-dsl"),
```
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
Swift DSLs for [MapLibre Native](https://github.com/maplibre/maplibre-native), a free open-source renderer
for interactive vector maps, to enable better integration with SwiftUI and generally enable easier use of MapLibre.

**NOTE: This package has migrated from Stadia Maps to the MapLibre organization 🎉**
If you previously installed this package,
see the [`CHANGELOG`](CHANGELOG.md) for steps to ensure Xcode stays happy.

![A screen recording demonstrating the declarative SwiftUI DSL reacting to changes live](demo.gif)

This package is a reimagining of the MapLibre API with a modern DSLs for SwiftUI.
Expand All @@ -32,19 +36,29 @@ Any breaking API changes will be reflected in release notes.

## Quick start

### In a normal Xcode project

If you're building an app using an Xcode project,
the easiest way to add package dependencies is in the File menu.
Search for the package using the repository URL: `https://github.com/maplibre/swiftui-dsl`.

### In a Swift package

Add the following to the main dependencies section of your `Package.swift`.

```swift
.package(url: "https://github.com/stadiamaps/maplibre-swiftui-dsl-playground", branch: "main"),
.package(url: "https://github.com/maplibre/swiftui-dsl", branch: "main"),
```

Then, for each target add either the DSL (for just the DSL) or both (for the SwiftUI view):

```swift
.product(name: "MapLibreSwiftDSL", package: "maplibre-swiftui-dsl-playground"),
.product(name: "MapLibreSwiftUI", package: "maplibre-swiftui-dsl-playground"),
.product(name: "MapLibreSwiftDSL", package: "swiftui-dsl"),
.product(name: "MapLibreSwiftUI", package: "swiftui-dsl"),
```

### Simple example: polyline rendering

Then, you can use it in a SwiftUI view body like this:

```swift
Expand Down
Loading