Closed adamduren closed 5 years ago
Overall this will be a breaking change but the benefits of increased code sharing I believe outweigh the downsides. We would need to communicate this to the community.
ionic-native-google-maps
and cordova-plugin-googlemaps
are two projects that I use heavily. I would be willing to undertake this refactor for ionic-native
so that it is easier to maintain which will then allow us to focus more effort on cordova-plugin-googlemaps
I don't want to provide two syntaxes. Please don't change a lot.
@wf9a5m75 there is more complexity around here than I thought. I am going to leave this open while I think on it more.
As mentioned, in the end I would like the ionic-native plugin to be pretty minimal and delegate to cordova-plugin-googlemaps
for most things.
Thank you for creating PR, but I think you still need to learn both plugins.
The @ionic-native/google-maps
plugin has original logic only for ionic, especially GoogleMaps.create()
around, that's why I don't merge both plugins.
Also I have a plan for supporting ionic/capacitor. The capacitor platform requires different plugin base if the case don't use ionic-native. I don't want to re-create the maps plugin.
I faced various problems, and fixed them until today. Those days has formed current code. I appreciate your PR, but please don't make a lot of changes.
However creating a good discussion is always welcome.
I only merged tsconfig.json
file at this time.
After further research I am understanding why the code is the way it is. Namely I didn't understand the BaseClass
and BaseArrayClass
being in the ionic plugin as well but now see that the behavior is customized for ionic native to do things like return Observables
vs passing an event listener.
@wf9a5m75 below is an example of simplifying the
ionic-native-google-maps
library to rely on the cordova plugin vs reimplementing functionality. Want to get your thoughts as it can lead to less code to maintain, less bugs, more consistency.