I would suggest the library expose the Logic classes to enable the customization of the logic.
DETAILS
For example in my case, I have to show the pins for the car parks on the map. Depends on the car park cost, available payment types, vacancy etc..., the pin will have a different "view".
For my first try, I was using BitmapDescriptorFactory.FromView(view) to show a Xamarin.Forms view with the binding to the car park data(cost, available payment types, vacancy etc.). It is working perfectly on iOS, but Android was not that lucky. After some investigation, I suspect the reason could be due to the "delay" renderer on Android for the view. PinLogic.TransformXamarinViewToAndroidBitmap() cannot properly convert the XF view to the Android view.
But PinLogic class is "internal", we cannot inherit the class. If the class is public, and the Logics property of MapRender is "protected" (instead of internal), I would inherit the class and draw a bitmap for the Pin, and then replace the PinLogic for the Logics property of MapRender.
Because I do like the library, I forked the repository and did the changes on the forked repository. I achieved what I want to implement. But if I can directly extend the feature from the official library, that will a little easier.
This appears to be completed in the latest 5.0 version. @KevinHu-au Do you happen to have any pointers as to exactly how you overwrote the existing Android behavior to get it working?
SUMMARY
I would suggest the library expose the Logic classes to enable the customization of the logic.
DETAILS
For example in my case, I have to show the pins for the car parks on the map. Depends on the car park cost, available payment types, vacancy etc..., the pin will have a different "view".
For my first try, I was using BitmapDescriptorFactory.FromView(view) to show a Xamarin.Forms view with the binding to the car park data(cost, available payment types, vacancy etc.). It is working perfectly on iOS, but Android was not that lucky. After some investigation, I suspect the reason could be due to the "delay" renderer on Android for the view. PinLogic.TransformXamarinViewToAndroidBitmap() cannot properly convert the XF view to the Android view.
But PinLogic class is "internal", we cannot inherit the class. If the class is public, and the Logics property of MapRender is "protected" (instead of internal), I would inherit the class and draw a bitmap for the Pin, and then replace the PinLogic for the Logics property of MapRender.
Because I do like the library, I forked the repository and did the changes on the forked repository. I achieved what I want to implement. But if I can directly extend the feature from the official library, that will a little easier.
PLATFORMS