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

scsjc

Well-Known Member
Licensed User
Longtime User
Is possible fix continuous scan satellite with Google maps? Like a navigator from Google.

Thanks
 

warwound

Expert
Licensed User
Longtime User
@Maxory

I'd guess that the version of the Google Play Services library (google-play-services.jar) that you have in your b4a additional libraries folder is not the latest version.

Run the Android SDK Manager and ensure all your android SDK stuff is up to date.
Now locate the google-play-services.jar file in your android SDK folder and copy it to your b4a additional libraries folder and try to compile your project again.

@scsjc

Not sure what you're asking - can you elaborate?
 

scsjc

Well-Known Member
Licensed User
Longtime User
@Maxory

I'd guess that the version of the Google Play Services library (google-play-services.jar) that you have in your b4a additional libraries folder is not the latest version.

Run the Android SDK Manager and ensure all your android SDK stuff is up to date.
Now locate the google-play-services.jar file in your android SDK folder and copy it to your b4a additional libraries folder and try to compile your project again.

@scsjc

Not sure what you're asking - can you elaborate?
.. When You are using the Google maps every 2 seconds (more or less) display the icon "gps" looking position. ....

In Google navigation this icon is continuous. .. Always Looking position. .. my answer is to know if it's possible change timing to looking gps position ...
(Sorry for my English)
Thanks
 

Maxory

Member
Licensed User
Longtime User
@warwound

I am sorry i found the error by my own. i changed the targetSdkVersion from 14 to 19 and everything works fine ;-)
 

Vincenzo Fabiano

Member
Licensed User
Longtime User
StreetViewPanorama1_PanoramaChange
SFaF124kgPDcYObcAPSC1Q
android.content.res.Resources$NotFoundException: String resource ID #0x7f110569
at android.content.res.Resources.getText(Resources.java:1123)
at android.content.res.Resources.getString(Resources.java:1217)
at com.google.maps.api.android.lib6.c.bj.a(Unknown Source)
at com.google.maps.api.android.lib6.c.ax.f(Unknown Source)
at com.google.maps.api.android.lib6.c.do.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
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:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **

Error on streetview... I can see for a moment the image of streetview and then the application crashes. Solutions @warwound ?

UPDATE: Crashes also uploaded the apk as an example .. Therefore it is a bug?
 
Last edited:

warwound

Expert
Licensed User
Longtime User
The ResourceNotFound Exception means that it's looking for an android resource and fails to find the resource.
The (official) android GoogleMaps library hasn't been updated for months so the existing code examples should work.

I'll not have time to look at the problem for a couple of days but will do so later this week.

Meanwhile you can check that your project is correctly including the required android resources - the resources are included in your project using the AdditionalRes attribute.

Martin.
 

Vincenzo Fabiano

Member
Licensed User
Longtime User
I also tried with the example already filled in by you and the error is the same .. Just load the streetview crashes. The app I installed on a S4 upgraded to the latest version, so you can rule out problems related to the device. I would really served include this option! Great library in any case!

Ps. You can use the cluster in the maps through your library?
 

warwound

Expert
Licensed User
Longtime User
I've just tested the StreetView examples and they all work fine for me - although i did have to change to compiling with the sign key that i used when obtaining the API key used in the examples.

You've created your own API key and updated your manifest have you?
 

Vincenzo Fabiano

Member
Licensed User
Longtime User
MY MANIFEST: (<API KEY> is my key..)

AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="<API KEY>/>)
AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" />)
AddManifestText(<uses-feature android:glEsVersion="0x00020000" android:required="true" />)

AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)

API ON MY PANEL:

Google Maps Android API v2
Google Maps Coordinate API
Google Maps Embed API
Google Maps Engine API
Google Maps JavaScript API v3
Street View Image API

These APIs are enabled in my panel, for safety I also tried to update the key and then reinsert it. But nothing .. Just load the preview streetview (i can see just for a moment) appears immediately crashes the app with the message of resources.

I found this link, I do not know if it is worthwhile:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=7184
 
Last edited:

eurojam

Well-Known Member
Licensed User
Longtime User
Dear Martin,
I have a problem with the groundoverlay. Already the provided example did not show the entire image, only a part of it. The result is, that the overlay isn't placed correctly. Do you have any idea what to do?

Cheers
Stefan
Screenshot_2014-10-27-15-10-06.png
 

Inman

Well-Known Member
Licensed User
Longtime User
Hello Martin, is it possible to plot on Google Maps, a driving road route between two points?
 

Shay

Well-Known Member
Licensed User
Longtime User
AddMarker3, is cutting the bitmap
what is the size of bitmap I need to put
and can I resize it to fit it for the AddMarker3 requirments?
 

scrat

Active Member
Licensed User
Longtime User
Hi martin

Do you still have the sources of the Mapsforge library used for mapsforgetileprovider.
I have to perform a few tests in MapDatabase.java but older sources are no longer available on the new git

Thanks
 

rboeck

Well-Known Member
Licensed User
Longtime User

scrat

Active Member
Licensed User
Longtime User
Thank you Martin the download is complete.
I'll try to increase the number of points for a way and see if it solves some rendering problems.

EDIT
I modified the source code like this
in MapDatabase.java line 81
B4X:
private static final int MAXIMUM_WAY_NODES_SEQUENCE_LENGTH = Short.MAX_VALUE;

Now some complex area are correctly rendered as the lagoon of Venice.

thank you again
 
Last edited:

eurojam

Well-Known Member
Licensed User
Longtime User
Dear Martin,
some help would be appreciated: I am hanging on the MyLocationChangeListener1. My code comes like this:

B4X:
Sub MapFragment1_Ready
....

        MapFragment1.GetMap.MyLocationEnabled = True
      

        Dim OnMyLocationChangeListener1 As OnMyLocationChangeListener
        OnMyLocationChangeListener1.Initialize("OnMyLocationChangeListener1")
        GoogleMapsExtras1.SetOnMyLocationChangeListener(GoogleMap1, OnMyLocationChangeListener1)

End Sub

Sub OnMyLocationChangeListener1_MyLocationChange(location1 As Location )
   Log("Loc...changed...")
    ' handle the location change here
End Sub

The problem is the Location1 As Location which is not recognized...as a location

Thanks
Stefan
 
Top