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: 2,852
  • MapsForgeTileProvider_v1.01.zip
    173.1 KB · Views: 2,732
  • GoogleMapsExtras_v2_0_library_files.zip
    82.5 KB · Views: 3,154
Last edited:

gerardguerin

Member
Licensed User
Longtime User
No my PNG are in the files folder and when use this code to load then icon on the map that crop

BitmapDescriptor1 = BitmapDescriptorFactory1.FromAsset("current_" & NumberFormat(PointerCenter,1,0) & ".png")

This working very well with the version 21 of google play services jar but got error with version 22
BitmapDescriptor1=BitmapDescriptorFactory1.FromBitmap(LoadBitmap(File.DirAssets, "current_" & NumberFormat(PointerCenter,1,0) & ".png"))

I don't know yet how to load from res folder but i will try to find and try it
 

coslad

Well-Known Member
Licensed User
Longtime User
HI , i tried to use a panel as view in the InfoWindowsAdapter but it generates an error:

java.lang.IllegalArgumentException: bitmap size exceeds 32bits

any idea ?
 

coslad

Well-Known Member
Licensed User
Longtime User
Hi, I would like to realize a info windows like the one I attached. Is it possible?
 

Attachments

  • 2015-03-13-09-27-37-1.png
    2015-03-13-09-27-37-1.png
    330.9 KB · Views: 256

achtrade

Active Member
Licensed User
Longtime User
The recommended way is to make use of the Marker id.
Look here: https://developer.android.com/reference/com/google/android/gms/maps/model/Marker.html
See the getId() method?
Each Marker has a unique id - it's of type String.

So create a Map where the Map key is the Marker id and the Map value is this 'tag' object or value that you want to associate with the Marker.

You can now get your 'tag' using the Marker id as a key.

could you please post an example to get that id?, I can't find that method


upload_2015-3-13_9-47-12.png
 

warwound

Expert
Licensed User
Longtime User
Look in GoogleMapsExtras - I'm sure there's a method in there somewhere (can't check right now).
 

warwound

Expert
Licensed User
Longtime User

warwound

Expert
Licensed User
Longtime User
OK, but, how the developer of this app did?

https://play.google.com/store/apps/details?id=org.vernazza.androidfuel

Maybe I can put a view upon the map panel, but how can I know the x,y of the pressed marker?

The third screenshot on the Play Store looks like a Panel that drops down from the top of the screen.
It doesn't look like an infowindow to me.
The screenshots that show infowindows all show infowindows with a basic design - no clickable views in them.

GoogleMapsExtras does support the Projection object and you can use it to convert between LatLngs and screen coordinates.
 

coslad

Well-Known Member
Licensed User
Longtime User
You wrong warwound , as you can see in the attached image, clicking on the marker comes up a panel with 3 button.
 

Attachments

  • img20150314_152107.png
    img20150314_152107.png
    133.1 KB · Views: 202

coslad

Well-Known Member
Licensed User
Longtime User
it is just what i search , but , it is too hard to me to implement it , maybe can you insert that capacity into the next update of mapsextra !;)
 
Top