Closed dzuluaga closed 1 year ago
Added but the Readme using directly in the Activity to simplify the explanation as Google does, see doc
Please replace activity for the fragment to be included in the code-starter
branch.
Sure in the code-starter branch can use fragment to hold the map
The starter-code branch in the maps-starter-sample uses a fragment
Issue 1:
The getting started documentation lacks clear guidance on where to include the provided code snippet. This omission can confuse developers who are unfamiliar with the proper placement of the code within their project.
Suggested Solution: Please add more context to the documentation, explicitly stating that the code snippet should be enclosed within a Fragment class. Additionally, provide a sample implementation of a Fragment class that includes the necessary interfaces and overrides.
Example Fix:
Issue 2:
Title: Missing Implementation of OmhOnMapReadyCallback
Description: The getting started documentation fails to mention that the Fragment class must implement the
OmhOnMapReadyCallback
interface. This interface is necessary to receive the callback when the map is ready to be used.Suggested Solution: It would be helpful to add a note in the documentation emphasizing that the Fragment class needs to implement the
OmhOnMapReadyCallback
interface. This ensures that developers understand the required implementation to receive the map-ready callback.Issue 3:
Title: Compilation Error in omhFragment.getMapAsync
Description: The code snippet provided in the getting started documentation includes
omhFragment.getMapAsync(this)
, which leads to a compilation error due to the absence of a non-null assertion (!!) or safe call. This issue can prevent developers from correctly implementing the map-related functionality.Suggested Solution: To resolve the compilation error, please update the code snippet in the documentation. Recommend using a non-null assertion (
!!
) or, preferably, a safe call (?.
) to ensure successful compilation.Example Fix: