B4A Library GoogleMapsExtras

GoogleMapsExtras is an ongoing project to implement more of the Google Maps Android v2 classes in Basic4Android.

Currently the library allows you to create these objects:

Tutorials for each object will be uploaded to the Google Maps Android v2 tutorial thread.

Martin.


Edit (Erel): proguard rules for R8 optimizer: https://www.b4x.com/android/forum/t...apsextras-2-00-setzoomcontrolsenabled.172313/
 

Attachments

Last edited by a moderator:
Markers are always on top of others layers
zindex of the markers is defined by latitude. Lower latitude ==> greater zindex.
 
GoogleMapsExtras has a method:

SetOnMapLoadedCallback (GoogleMap1 As GoogleMap, OnMapLoadedCallback1 As OnMapLoadedCallback)
Sets a callback that's invoked when the map has finished rendering.
Martin,

Many thanks - after running up a few dead ends of my own creation I was eventually able to work out how to detect completion of camera animation and map rendering.
 
Not sure whether this is a Google Maps or Google Maps Extra question...

If there any way to determine the screen dimensions of a Google Map marker - i.e. a "standard" marker as created by the AddMarker or AddMarker2 methods?

Thanks in anticipation...
 
If there any way to determine the screen dimensions of a Google Map marker - i.e. a "standard" marker as created by the AddMarker or AddMarker2 methods?

Not that i know of.
The Marker, BitmapDescriptor and BitmapDescriptorFactory don't have any methods to get the icon dimensions.
 
GoogleMap.MyLocation returns the current location.

tq erel, solved...

i put gmap.MyLocationEnabled=True, and then waiting with timer_tick until gmap.MyLocation.IsInitialized=True

if gmap.MyLocation.IsInitialized=True then

latnya=gmap.MyLocation.Latitude
longnya=gmap.MyLocation.Longitude

end if
 
Hi, i have a problem. I would like the user to draw a polygon clicking on the screen and when the polygon "closes" a dialog appear. I only can draw polygons sending the points "hardcoded". How can the user draw a polygon by clicken? Is there any example?
Thanks
 
@warwound

can you add other method/events like :

setOnGroundOverlayClickListener
OnCameraIdleListener
OnGroundOverlayClickListener
OnIndoorStateChangeListener

Thanks in advance
 
I get an error when i try to compile this:

Code:
Dim OnMyLocationChangeListener1 As OnMyLocationChangeListener
    OnMyLocationChangeListener1.Initialize("OnMyLocationChangeListener1")
    gmapextras.SetOnMyLocationChangeListener(gmap, OnMyLocationChangeListener1)

gmapextras.SetOnMyLocationChangeListener(gmap, On
javac 1.8.0_25
src\the\walk\home.java:458: error: cannot find symbol
mostCurrent._gmapextras.SetOnMyLocationChangeListener((com.google.android.gms.maps.GoogleMap)(mostCurrent._gmap.getObject()),(com.google.android.gms.maps.GoogleMap.OnMyLocationChangeListener)(_onmylocationchangelistener1.getObject()));
^
symbol: class google
location: class com

i use the "new" googlemap library from here:
https://www.b4x.com/android/forum/threads/google-maps.63930/
 
It seems that every GooglemapExtra function failed with this error.
same with
Code:
gmapextras.SetBuildingsEnabled(gmap,True)

and i tested it with a completly new project, and there it works. but i dont see the mistake...

-same librariea in both projects
- same manifest
 
Last edited:
Back
Top