-
Notifications
You must be signed in to change notification settings - Fork 504
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
Web implementation #223
Web implementation #223
Conversation
update gitignore
remove dart:ui for conflict in web
@andrea689 cool seeing this move forward! Refs #26 |
- initPlatform - buildView - updateMapOptions - animateCamera - moveCamera - setTelemetryEnabled - getTelemetryEnabled - getVisibleRegion - setCameraTargetBounds - setMinMaxZoomPreference - setRotateGesturesEnabled - setScrollGesturesEnabled - setStyleString - setTiltGesturesEnabled - setTrackCameraPosition - setZoomGesturesEnabled add instruction in README for add accessToken in web platform
@andrea689 Great to see this being worked on. Let me know if need help |
add setMapLanguage
handle addSymbol, updateSymbol and removeSymbol
refactor symbolManager to use abstract featureManager
add onMapStyleLoadedPlatform
add requestMyLocationLatLng add onCameraTrackingChangedPlatform add onCameraTrackingDismissedPlatform add setMyLocationEnabled add setMyLocationTrackingMode myLocationRenderMode not available invalidateAmbientCache not available
add setCompassGravity setCompassViewMargins not available setLogoViewMargins not available setAttributionButtonMargins not available
* master: Support setting map's content insets (flutter-mapbox-gl#215) Provide `onMapIdle` callback (flutter-mapbox-gl#214) [example] add full page map example (flutter-mapbox-gl#201) Fix missing location indicator on iOS (flutter-mapbox-gl#176) Returned a nil result so the future completes. (flutter-mapbox-gl#216) Update README: Access Tokens for self-hosted tiles (flutter-mapbox-gl#217) Change annotation priority (flutter-mapbox-gl#222)
Trying to get symbols and lines to work, noticed Works fine in |
Symbols and lines are not working in release builds or profile builds. Building with Flutter 1.15.17 • channel beta • https://github.com/flutter/flutter.git |
fix setData in release
* master: Updated location package and code to cope with a breaking change. (flutter-mapbox-gl#239)
@@ -1,5 +1,5 @@ | |||
# Generated by pub |
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 think we can gitignore this file, as it's generated
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.
this file contains all packages version used.. if we don't commit this file, and a new incompatible version of a package is released, a new user may have problems
@@ -0,0 +1,7 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
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 think we can probably also gitignore these AndroidManifest.xml files in /debug and /profile as I think they are generated, but it's probably also not an issue to commit them
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 current implementation still has the Page component that conflict with a new Page component in the Flutter SDK.
I think the strong typed interface is a great improvement. Great job!
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'text-allow-overlap': true, | ||
'text-ignore-placement': true, |
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.
Maybe add a todo here for the tail work in making these options configurable. Also see #206 .
Future<void> _addStylesheetToShadowRoot() async { | ||
int index = -1; | ||
while (index == -1) { | ||
index = document.getElementsByTagName('flt-platform-view').length - 1; | ||
await Future.delayed(Duration(milliseconds: 10)); | ||
} | ||
HtmlElement e = document.getElementsByTagName('flt-platform-view')[index] | ||
as HtmlElement; | ||
|
||
LinkElement link = LinkElement(); | ||
link.href = | ||
'https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.1/mapbox-gl.css'; | ||
link.rel = 'stylesheet'; | ||
e.shadowRoot.append(link); | ||
|
||
await link.onLoad.first; | ||
} |
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.
Why is the CSS added to the shadow root of this component? What is the reason why is it not added to the HEAD? As this is attached to a specific version of Mapbox GL JS this could lead to inconsistencies in the UI.
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.
because the shadow DOM not see the css added to head section.. I found this workaround but I am opened to new solution!
@override | ||
Future<CameraPosition> updateMapOptions( | ||
Map<String, dynamic> optionsUpdate) async { | ||
// FIX: why is called indefinitely? (map_ui page) |
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 noticed the updates are triggered due to mapChanged events. Probably due to a combination of tracking options passed to the MapboxMap
.
@andrea689 I'm currently getting errors in the examples because of the changes we made in #258, could you rebase to solve those? |
Not sure if it is indeed an issue but pointing my pubspec to the repo & brach of @andrea689 like so:
gives me this error:
I fixed it in a fork like this:
When this PR is merged it would be nice to have a 0.6 release of this package. |
@andrea689 I just did a thorough testing and everything is looking really fine already.
|
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.
awesome work @andrea689! Could you rebase on head of master and resolve conflicts. Really excited getting support for web on this project 😄
* master: [flutter] release v0.6.0 Change gradle version to 3.5.0 instead of 3.6.1 Update Mapbox plugins and gradle iOS: add long press handler (flutter-mapbox-gl#268) [android] Implemented long click for Android (flutter-mapbox-gl#198) [fix] Change default MyLocationTrackingMode to None (flutter-mapbox-gl#285) Add First-Class Support For Listening to `onCameraIdle` events (flutter-mapbox-gl#280) CI: use stable flutter channel also on iOS (flutter-mapbox-gl#270) Implement addImage() to style (flutter-mapbox-gl#269) Add animation duration for animateCamera (flutter-mapbox-gl#259) Document onStyleLoadedCallback (flutter-mapbox-gl#257) example: rename Page to ExamplePage (flutter-mapbox-gl#258)
The bots are reporting, 1 small thing, we are close:
|
mapbox_gl_platform_interface/lib/src/mapbox_gl_platform_interface.dart
Outdated
Show resolved
Hide resolved
mapbox_gl_platform_interface/lib/src/method_channel_mapbox_gl.dart
Outdated
Show resolved
Hide resolved
Point was imported from dart:math and dart:ui
I added sdf on iOS addImage
The scrolling map page not working because with actual implementation only one map for page is working.. I will refactor the code to work with more the one map for page |
@andrea689 That is fine for first version, let's merge and keep iterating. Can you ticket out all the remaining work? edit: I can only squash merge this PR, rebase merging won't be possible. |
dismissing review to merge the PR, please ticket out any tailwork you want to see adressed!
I'm working on web implementation. This is next steps:
setTelemetryEnabledgetTelemetryEnabledinvalidateAmbientCachesetAttributionButtonMarginssetCompassViewMarginssetLogoViewMarginssetMyLocationRenderModeonInfoWindowTappedPlatform