You can use Google Maps URLs that provides universal cross-platform URL to launch Google Maps. Currently this is recommended and supported way to open Google Maps app.
According to the documentation
On an iOS device:
If Google Maps app for iOS is installed, the URL launches Google Maps in the Maps app and performs the requested action.
If the Google Maps app is not installed, the URL launches Google Maps in a browser and performs the requested action.
This behavior is pretty much what you were asking about, so replace comgooglemaps scheme with Google Maps URL (e.g. https://www.google.com/maps/search/?api=1¶meters
) and you are settled.
I hope this helps!