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

Doesn't appear to be a way to use in iOS #1

Open
m-montoya opened this issue Mar 8, 2024 · 3 comments
Open

Doesn't appear to be a way to use in iOS #1

m-montoya opened this issue Mar 8, 2024 · 3 comments

Comments

@m-montoya
Copy link

Looks promising but I don't see a way to use this in a iOS app. Can you elaborate on how to translate the [FixShape] returned to a format in which iOS Mapkit understands? The paths it contains don't appear valid for usage.

@NailxSharipov
Copy link
Member

I haven't used it with Apple map. Is it use CGPath api?

@m-montoya
Copy link
Author

m-montoya commented Mar 14, 2024 via email

@NailxSharipov
Copy link
Member

NailxSharipov commented Mar 14, 2024

let union = graph.extractShapes(overlayRule: OverlayRule.union)

here union is [FixShape]

FixShape itself is a struct to represent polygon and it's holes in int coordinate system.
The library itself doesn't have an api to convert FixShape to CGPath. But it's not super complicated to write your own. May be in future I will add some sugar api for CGPath

Result of 2 not intersecting shapes will be still 2 shapes.

Have you played with this demo?
https://ishape-rust.github.io/iShape-js/overlay/shapes_editor.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants