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,137
  • MapsForgeTileProvider_v1.01.zip
    173.1 KB · Views: 2,054
  • GoogleMapsExtras_v2_0_library_files.zip
    82.5 KB · Views: 2,383
Last edited:

MarcoRome

Expert
Licensed User
Really very impressive

Screenshot_20170801-235307.jpg
 

DonManfred

Expert
Licensed User
@DonManfred Can you work with an SVN repo?
You'd just need to pull and commit, nothing fancy.
i´m sure i´m able once i get told how to do it.

I also started wrapping :D
Most of them are used by the GeoJson Feature of the MapUtils...
They are written but not tested as yet...

Snap11.png
 
Last edited:

warwound

Expert
Licensed User

wes58

Active Member
Licensed User
I have an application that I have written a while ago. I haven't used StreetViewPanorama for a while, but today, when I clicked on a button to show it it came up with an error:
java.lang.NoSuchMethodError: No virtual method getStreetViewPanorama()Lcom/google/android/gms/maps/StreetViewPanorama; in class Lcom/google/android/gms/maps/StreetViewPanoramaView; or its super classes (declaration of 'com.google.android.gms.maps.StreetViewPanoramaView' appears in base.apk)
at uk.co.martinpearman.b4a.com.google.android.gms.maps.StreetViewPanoramaView.GetStreetViewPanorama(StreetViewPanoramaView.java:29)

After checking, I found out that, as usual, Google had to do some changes that made this error
The previously-deprecated getStreetViewPanorama() function is no longer available in the Google Play services SDK. (It is still available in the Google Play services APK that is delivered to Android devices. Existing apps therefore continue running normally until you recompile them.) The getStreetViewPanorama() function has been deprecated since December 2014. Instead, you should use StreetViewPanoramaView.getStreetViewPanoramaAsync() or StreetViewPanoramaFragment.getStreetViewPanoramaAsync() to get a ready-to-use Street View panorama. See the developer's guide.

Would it be possible to fix this in the library?
 

mkh_fx

Member
Licensed User
i have an application like uber.- taxify and ...
i want to detect start and end dragging map events
camera_change and location_change not good solution
i want to detect all touch actions on the map

thanks
 

nibbo

Active Member
Licensed User
Hi warwound

This lib is awesome, thank you very much for your time and effort.

I have used the InfoWindowAdaptor to produce a much better info window which looks great.
However, I wanted to put 2 or more 'clickable' image views inside the container view that loads within the standard InfoWindow (panel in this instance).
Basically, I want the user to click a marker on the map, pop up the adapted info window and then be able to click on options from within the info window.
The info window contains several views but the click events do not seem to fire for the individual views or even the containing panel.
It seems that only the InfoWindow_Click event can be fired not the content within the adapted info window.

I could detect the InfoWindowClick and pop up another panel with the various options but would prefer to handle with a single click if possible.

Is it possible to detect the click events from the child elements in the adapted view?

Hope this makes sense but let me know if you need further clarification.

Cheers
Nibbo
 

warwound

Expert
Licensed User
Is it possible to detect the click events from the child elements in the adapted view?

No.

Have a look at this link on Stackoverflow: https://stackoverflow.com/questions/20283539/button-onclicklistener-on-infowindow-in-google-map

The info window that is drawn is not a live view. The view is rendered as an image (using View.draw(Canvas))

Furthermore, the info window will not respect any of the interactivity typical for a normal view such as touch or gesture events. However you can listen to a generic click event on the whole info window as described in the section below.
 

nibbo

Active Member
Licensed User
No.

The info window that is drawn is not a live view. The view is rendered as an image (using View.draw(Canvas))

I was starting to think this must be the case, thanks for confirming.
Still great to be able to make pretty InfoWindows, thanks.
 

Almora

Active Member
Licensed User
main_activity_create (java line: 475)
java.lang.NoSuchMethodError: com.google.android.gms.maps.StreetViewPanoramaView.getStreetViewPanorama
at uk.co.martinpearman.b4a.com.google.android.gms.maps.StreetViewPanoramaView.GetStreetViewPanorama(StreetViewPanoramaView.java:17)
at com.example.main._activity_create(main.java:475)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at com.example.main.afterFirstLayout(main.java:102)
at com.example.main.access$000(main.java:17)
at com.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5019)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

StreetViewPanorama

I am getting such an error. I could not find the cause.
 
Last edited:

androidvh

Member
Licensed User
Hallo,

I like to use a "Tag" in circle options.
Is there a need to built a map with the id of the circle
or we have another option?

Kind regards Volker
 

michw

Member
Licensed User
Hello,
I have a question, how can I call the InfoWindowAdapter window by pressing the item in listview?

thx
 

warwound

Expert
Licensed User
Hello,
I have a question, how can I call the InfoWindowAdapter window by pressing the item in listview?

thx

Look at the Marker documentation:

InfoWindowShown As Boolean
Gets or sets whether the info window is shown.

When an item in your ListView is clicked try setting the corresponding Marker's InfoWindowShown property to True.
 

michw

Member
Licensed User
Yes, if I call Marker1.InfoWindowShown = True, this window shows, but this is not a window with InfoWindowAdapter, because there I have more text

if I press the marker on the map, this window is with more text
 
Top