franalma / mapswrapper Goto Github PK
View Code? Open in Web Editor NEWWrap in same object Google and Huawei maps
License: MIT License
Wrap in same object Google and Huawei maps
License: MIT License
Hi,
ExtendedMap class is missing setMapStyle(MapStyleOptions style)
method. It is important for supporting dark mode in apps.
I've prepared a solution in a branch https://github.com/drahovac/MapsWrapper/tree/feature/add-map-style-options.
Unfortunately huawei uses different json for styling, so I had to change MapStyleOptions
api to be able to load both resources for google and huawei.
GroundOverlayOptions#positionFromBounds
is and GroundOverlayOptions#zIndex
should return GroundOverlayOptions
instead of void
Why so high minSdk 24 is used?
I tried running on API 21 and everything looks like working correctly.
On both Huawei devices with only HMS installed or GMS deactivated and HMS activated, the maps wrapper still uses a Google MapView instead of a Huawei one which makes getMapAsync return null (since the GMS are not available). This can only be fixed by enforcing Huawei.
2020-10-27 13:42:40.993 430-430/xx.xx.xx E/XXX: BaseMapFragment
java.lang.NullPointerException: Attempt to invoke virtual method 'maps.wrapper.GroundOverlay maps.wrapper.ExtendedMap.addGroundOverlay(maps.wrapper.GroundOverlayOptions)' on a null object reference
at xxx.BaseMapFragment.showLayer(BaseMapFragment.java:784)
at xxx.fragments.BaseMapFragment.onLayerLoaded(BaseMapFragment.java:721)
at xxx.fragments.ForecastMapFragment.onLayerLoaded(ForecastMapFragment.java:543)
at xxx.controllers.ForecastLayerController.onBitmapLoadResult(ForecastLayerController.kt:65)
at xxx.glide.LayerBitmapSimpleTarget.onResourceReady(LayerBitmapSimpleTarget.kt:20)
at xxx.glide.LayerBitmapSimpleTarget.onResourceReady(LayerBitmapSimpleTarget.kt:13)
at com.bumptech.glide.request.SingleRequest.onResourceReady(SingleRequest.java:582)
at com.bumptech.glide.request.SingleRequest.onResourceReady(SingleRequest.java:544)
at com.bumptech.glide.load.engine.EngineJob.callCallbackOnResourceReady(EngineJob.java:152)
at com.bumptech.glide.load.engine.EngineJob$CallResourceReady.run(EngineJob.java:398)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7377)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Hi, thanks for your work. I could not find any information about the maps wrapper's license. Could you please specify a license so other projects know if they can use or modify it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.