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.
 

Attachments

  • GoogleMapsExtras_v1_71.zip
    59.6 KB · Views: 3,159
  • MapsForgeTileProvider_v1.01.zip
    173.1 KB · Views: 3,042
  • GoogleMapsExtras_v2_0_library_files.zip
    82.5 KB · Views: 3,471
Last edited:

scrat

Active Member
Licensed User
Longtime User
Markers are always on top of others layers
zindex of the markers is defined by latitude. Lower latitude ==> greater zindex.
 

warwound

Expert
Licensed User
Longtime User

JackKirk

Well-Known Member
Licensed User
Longtime User
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.
 

JackKirk

Well-Known Member
Licensed User
Longtime User
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...
 

warwound

Expert
Licensed User
Longtime User
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.
 

Leni Berry

Active Member
Licensed User
Longtime User
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
 

s4agtech

New Member
Licensed User
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
 

Ohanian

Active Member
Licensed User
Longtime User
@warwound

can you add other method/events like :

setOnGroundOverlayClickListener
OnCameraIdleListener
OnGroundOverlayClickListener
OnIndoorStateChangeListener

Thanks in advance
 

DonManfred

Expert
Licensed User
Longtime User

Blueforcer

Well-Known Member
Licensed User
Longtime User
I get an error when i try to compile this:

B4X:
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/
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
It seems that every GooglemapExtra function failed with this error.
same with
B4X:
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:
Top