Feb 11, 2013 Replies: 442 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: BitmapDescriptor BitmapDescriptorFactory Circle CircleOptions GroundOverlay InfoWindowAdapter MarkerOptions Point Projection OnInfoWindowClickListener OnMarkerDragListener OnMyLocationChangeListener Polygon TileOverlay VisibleRegion 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 GoogleMapsExtras_v1_71.zip GoogleMapsExtras_v1_71.zip 59.6 KB · Views: 3,503 MapsForgeTileProvider_v1.01.zip MapsForgeTileProvider_v1.01.zip 173.1 KB · Views: 3,395 GoogleMapsExtras_v2_0_library_files.zip GoogleMapsExtras_v2_0_library_files.zip 82.5 KB · Views: 3,837 Last edited by a moderator: Oct 18, 2026 Click to expand...
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: BitmapDescriptor BitmapDescriptorFactory Circle CircleOptions GroundOverlay InfoWindowAdapter MarkerOptions Point Projection OnInfoWindowClickListener OnMarkerDragListener OnMyLocationChangeListener Polygon TileOverlay VisibleRegion 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/
B Brian Robinson Active Member Licensed User Longtime User Feb 27, 2016 #321 warwound said: I've been so busy with work over the past few months i spend hardly any time on b4a. I've no idea if that'll change and i'll have more free time or whether my free time will be too limited to get any b4a stuff done . Click to expand... Don't worry mate. I fully understand how life can be... And I am more than happy and really appreciative of what you have built already! So cheers to you!
warwound said: I've been so busy with work over the past few months i spend hardly any time on b4a. I've no idea if that'll change and i'll have more free time or whether my free time will be too limited to get any b4a stuff done . Click to expand... Don't worry mate. I fully understand how life can be... And I am more than happy and really appreciative of what you have built already! So cheers to you!
I iCAB Well-Known Member Licensed User Longtime User Feb 27, 2016 #322 Hi Warwound Thanks for your reply to my post warwound said: The OnMyLocationButtonClickListener Initialize method will fail if it cannot find the required callback sub(s). If it fails to initialize then it'll display a warning in the log window. In your posted code it looks as though you have the required callback sub - the 'Click' event handler. Do you see any warning in the log window when you run this code? Click to expand... When I place a break point at this line Code: GoogleMapsExtras1.SetOnMyLocationButtonClickListener(gmap,OnMyLocationButtonClickListener1) the following message appears in the log window "OnMyLocationButtonClickListener not initialized, no event handling Sub found" Am I doing something wrong in here ?
Hi Warwound Thanks for your reply to my post warwound said: The OnMyLocationButtonClickListener Initialize method will fail if it cannot find the required callback sub(s). If it fails to initialize then it'll display a warning in the log window. In your posted code it looks as though you have the required callback sub - the 'Click' event handler. Do you see any warning in the log window when you run this code? Click to expand... When I place a break point at this line Code: GoogleMapsExtras1.SetOnMyLocationButtonClickListener(gmap,OnMyLocationButtonClickListener1) the following message appears in the log window "OnMyLocationButtonClickListener not initialized, no event handling Sub found" Am I doing something wrong in here ?
warwound Expert Licensed User Longtime User Feb 27, 2016 #323 iCAB said: Am I doing something wrong in here Click to expand... Guess so! The log message says that GoogleMapsExtras cannot find a Sub that will handle the Click event. So it fails to initialize. Your posted code looks ok to me (but i just looked at it and didn't test it). Look closely at the code you are compiling - does the OnMyLocationButtonClickListener event name plus "_Click" name a sub that exists?
iCAB said: Am I doing something wrong in here Click to expand... Guess so! The log message says that GoogleMapsExtras cannot find a Sub that will handle the Click event. So it fails to initialize. Your posted code looks ok to me (but i just looked at it and didn't test it). Look closely at the code you are compiling - does the OnMyLocationButtonClickListener event name plus "_Click" name a sub that exists?
I iCAB Well-Known Member Licensed User Longtime User Feb 28, 2016 #324 Hi Warwound The sad part is that I think that the code is correct If you look at my original post #318, you will see the code below Code: Sub OnMyLocationButtonClickListener1_Click Log("Success!") End Sub
Hi Warwound The sad part is that I think that the code is correct If you look at my original post #318, you will see the code below Code: Sub OnMyLocationButtonClickListener1_Click Log("Success!") End Sub
B Brian Robinson Active Member Licensed User Longtime User Feb 28, 2016 #325 iCAB said: Hi Warwound The sad part is that I think that the code is correct If you look at my original post #318, you will see the code below Code: Sub OnMyLocationButtonClickListener1_Click Log("Success!") End Sub Click to expand... Just a thought. Have you tried moving the sub declaration above the call. Cheers Brian
iCAB said: Hi Warwound The sad part is that I think that the code is correct If you look at my original post #318, you will see the code below Code: Sub OnMyLocationButtonClickListener1_Click Log("Success!") End Sub Click to expand... Just a thought. Have you tried moving the sub declaration above the call. Cheers Brian
I iCAB Well-Known Member Licensed User Longtime User Feb 28, 2016 #326 Brian Robinson said: Just a thought. Have you tried moving the sub declaration above the call. Cheers Brian Click to expand... Brian, thanks for your input, but I have already tried that and didn't work.
Brian Robinson said: Just a thought. Have you tried moving the sub declaration above the call. Cheers Brian Click to expand... Brian, thanks for your input, but I have already tried that and didn't work.
B Brian Robinson Active Member Licensed User Longtime User Feb 28, 2016 #327 iCAB said: Brian, thanks for your input, but I have already tried that and didn't work. Click to expand... Ok... Solved it... the sub has to end with "_MyLocationButtonClick", and not "_Click". I had to create a Test app to be able to look into it and was busy releasing an app this afternoon, so sorry I took a while to get back to you. It is handy to know that when you want to add an Event sub to know what the extension is you can type Sub followed by a space, and then when you hit the Tab button it will show you the options you have. Cheers Brian
iCAB said: Brian, thanks for your input, but I have already tried that and didn't work. Click to expand... Ok... Solved it... the sub has to end with "_MyLocationButtonClick", and not "_Click". I had to create a Test app to be able to look into it and was busy releasing an app this afternoon, so sorry I took a while to get back to you. It is handy to know that when you want to add an Event sub to know what the extension is you can type Sub followed by a space, and then when you hit the Tab button it will show you the options you have. Cheers Brian
I iCAB Well-Known Member Licensed User Longtime User Feb 28, 2016 #328 Brian, thanks again for taking the time to look into this for me. I wish I knew about this long time ago: Brian Robinson said: It is handy to know that when you want to add an Event sub to know what the extension is you can type Sub followed by a space, and then when you hit the Tab button it will show you the options you have. Click to expand... I have wasted a lot of time searching the forum for examples to find the correct Events extensions Thanks for the great tip
Brian, thanks again for taking the time to look into this for me. I wish I knew about this long time ago: Brian Robinson said: It is handy to know that when you want to add an Event sub to know what the extension is you can type Sub followed by a space, and then when you hit the Tab button it will show you the options you have. Click to expand... I have wasted a lot of time searching the forum for examples to find the correct Events extensions Thanks for the great tip
warwound Expert Licensed User Longtime User Feb 28, 2016 #329 @iCAB There is an HTML reference document in the GoogleMapsExtras library download named GoogleMapsExtras.html which documents all library objects, methods, properties and event names. Just open the HTML document in a browser. I didn't notice that the event was "MyLocationButtonClick" and not just "Click" - well spotted @Brian Robinson!
@iCAB There is an HTML reference document in the GoogleMapsExtras library download named GoogleMapsExtras.html which documents all library objects, methods, properties and event names. Just open the HTML document in a browser. I didn't notice that the event was "MyLocationButtonClick" and not just "Click" - well spotted @Brian Robinson!
I iCAB Well-Known Member Licensed User Longtime User Feb 29, 2016 #330 Hi Warwound Thanks a lot. This is extremely helpful. Now I can take full advantage of the library!! By the way, well done.. works really nice
Hi Warwound Thanks a lot. This is extremely helpful. Now I can take full advantage of the library!! By the way, well done.. works really nice
marcick Well-Known Member Licensed User Longtime User Apr 2, 2016 #331 Pass to it an empty list of points
marcick Well-Known Member Licensed User Longtime User Apr 3, 2016 #332 Code: dim pp as list pp.initialize polygon1.points=pp this should leave the polygon object but no longer visible. Polygon1.remove also should work to definitely remove it Try to post the sample code that give the error
Code: dim pp as list pp.initialize polygon1.points=pp this should leave the polygon object but no longer visible. Polygon1.remove also should work to definitely remove it Try to post the sample code that give the error
S Serdar K. Member Licensed User Longtime User May 16, 2016 #333 Hello, I would like to thank you for this useful and successful library, warwound. I would like to inform you about one little issue, regarding to Erel's request. I am getting a "Fatal signal 11 (SIGSEGV) at 0xfff0f0f0 (code=1)... " message in my application on "OnMarkerDragListener1_DragEnd" event (with an Android 4.1.2 device). It is random. Once in 3-4 executions , it happens and the app crashes without any B4A error message. I found out that this is related to the same issue on the keypress event reported in another post : https://www.b4x.com/android/forum/threads/android-4-3-pb-with-closing-the-app.31328/#post-186702 I have found that the workaround which Erel suggested for the above issue works also fine with my issue. My post and solution about it is on the link : https://www.b4x.com/android/forum/threads/another-fatal-signal-11-sigsegv-issue.66840/#post-423373 Thanks again for the great work. Regards, Serdar
Hello, I would like to thank you for this useful and successful library, warwound. I would like to inform you about one little issue, regarding to Erel's request. I am getting a "Fatal signal 11 (SIGSEGV) at 0xfff0f0f0 (code=1)... " message in my application on "OnMarkerDragListener1_DragEnd" event (with an Android 4.1.2 device). It is random. Once in 3-4 executions , it happens and the app crashes without any B4A error message. I found out that this is related to the same issue on the keypress event reported in another post : https://www.b4x.com/android/forum/threads/android-4-3-pb-with-closing-the-app.31328/#post-186702 I have found that the workaround which Erel suggested for the above issue works also fine with my issue. My post and solution about it is on the link : https://www.b4x.com/android/forum/threads/another-fatal-signal-11-sigsegv-issue.66840/#post-423373 Thanks again for the great work. Regards, Serdar
I iCAB Well-Known Member Licensed User Longtime User May 23, 2016 #334 Hi All I have a map with Several Markers displayed. When I display a polygon, the markers appear as if they are behind the polygon. I tried setting the polygon ZIndex = 0 , but still getting the same results. What is the best way to insure that the markers appear on top and not behind the polygon Thanks in advance
Hi All I have a map with Several Markers displayed. When I display a polygon, the markers appear as if they are behind the polygon. I tried setting the polygon ZIndex = 0 , but still getting the same results. What is the best way to insure that the markers appear on top and not behind the polygon Thanks in advance
marcick Well-Known Member Licensed User Longtime User May 25, 2016 #335 Looking to my old code, when I draw a polyline, i set its zindex to 3. I suppose it was intended to let the polyline to be behind the marker. Give it a try
Looking to my old code, when I draw a polyline, i set its zindex to 3. I suppose it was intended to let the polyline to be behind the marker. Give it a try
warwound Expert Licensed User Longtime User May 25, 2016 #336 iCAB said: I have a map with Several Markers displayed. When I display a polygon, the markers appear as if they are behind the polygon. I tried setting the polygon ZIndex = 0 , but still getting the same results. Click to expand... 0 might be the default z index for all overlay objects. If that's true then you've given your polygons the same index as your markers. Do as marcick suggested and experiment with different z index values - for both polygons and markers.
iCAB said: I have a map with Several Markers displayed. When I display a polygon, the markers appear as if they are behind the polygon. I tried setting the polygon ZIndex = 0 , but still getting the same results. Click to expand... 0 might be the default z index for all overlay objects. If that's true then you've given your polygons the same index as your markers. Do as marcick suggested and experiment with different z index values - for both polygons and markers.
I iCAB Well-Known Member Licensed User Longtime User May 25, 2016 #337 marcick said: Looking to my old code, when I draw a polyline, i set its zindex to 3. I suppose it was intended to let the polyline to be behind the marker. Give it a try Click to expand... I am setting Z-Index for the polygon to 0, to send it to the back based on Google documentation: "The order in which this polygon is drawn with respect to other overlays, including Polylines, Circles,GroundOverlays and TileOverlays, but not Markers. An overlay with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays with the same z-index value is arbitrary. The default is 0." warwound said: Do as marcick suggested and experiment with different z index values - for both polygons and markers. Click to expand... I don't see Z-Index as a property for the Marker. Thanks for your reply
marcick said: Looking to my old code, when I draw a polyline, i set its zindex to 3. I suppose it was intended to let the polyline to be behind the marker. Give it a try Click to expand... I am setting Z-Index for the polygon to 0, to send it to the back based on Google documentation: "The order in which this polygon is drawn with respect to other overlays, including Polylines, Circles,GroundOverlays and TileOverlays, but not Markers. An overlay with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays with the same z-index value is arbitrary. The default is 0." warwound said: Do as marcick suggested and experiment with different z index values - for both polygons and markers. Click to expand... I don't see Z-Index as a property for the Marker. Thanks for your reply
marcick Well-Known Member Licensed User Longtime User May 25, 2016 #338 Yes, but my polyline with zindex 3 is drawn behind markers. Try it ....
I iCAB Well-Known Member Licensed User Longtime User May 26, 2016 #339 marcick said: Yes, but my polyline with zindex 3 is drawn behind markers. Try it .... Click to expand... I did that, by I am still getting the same results. Now let me clarify a bit more: 1. The polygon being drawn with transparency, and StorkeWidth = 2 . 2. So the markers are more or less visible 3. When I place a marker on the edge of the polygon, I can clearly see that the edge line is going over the icon
marcick said: Yes, but my polyline with zindex 3 is drawn behind markers. Try it .... Click to expand... I did that, by I am still getting the same results. Now let me clarify a bit more: 1. The polygon being drawn with transparency, and StorkeWidth = 2 . 2. So the markers are more or less visible 3. When I place a marker on the edge of the polygon, I can clearly see that the edge line is going over the icon
JackKirk Well-Known Member Licensed User Longtime User Jun 11, 2016 #340 Hi, I've fairly successfully used the GoogleMapsExtras library in an app I am writing. I've been able to use a CancelCallback object in an AnimateCamera3 method to detect when it finishes. What I am finding though is that the app gets control in the CancelCallback_Finish event after the camera move/ rotate/ zoom has occurred but not necessarily after all necessary tiles have been loaded. Is there any way to detect all necessary tiles have been loaded after you fire the AnimateCamera3 method? Thanks in anticipation... Last edited: Jun 11, 2016
Hi, I've fairly successfully used the GoogleMapsExtras library in an app I am writing. I've been able to use a CancelCallback object in an AnimateCamera3 method to detect when it finishes. What I am finding though is that the app gets control in the CancelCallback_Finish event after the camera move/ rotate/ zoom has occurred but not necessarily after all necessary tiles have been loaded. Is there any way to detect all necessary tiles have been loaded after you fire the AnimateCamera3 method? Thanks in anticipation...