B bvonlaar Member Licensed User Longtime User Apr 24, 2017 #1 Hello, actual I´m working on removing changed marker in googlemaps. I work with a map object and a marker object. Dim MMark as Marker MMark.remove ... By writing MMark.remove I got during writing a "Unknown member: remove" message. For MMark. I get only the Options: IsInitialized, Position, Title. Visible ! Has anyone an idea why remove isn´t offered? Benedikt
Hello, actual I´m working on removing changed marker in googlemaps. I work with a map object and a marker object. Dim MMark as Marker MMark.remove ... By writing MMark.remove I got during writing a "Unknown member: remove" message. For MMark. I get only the Options: IsInitialized, Position, Title. Visible ! Has anyone an idea why remove isn´t offered? Benedikt
DonManfred Expert Licensed User Longtime User Apr 24, 2017 #2 Hmmm... B4X: Expand Collapse Copy googlemap.removemarker(MMark) ? Upvote 0
B bvonlaar Member Licensed User Longtime User Apr 24, 2017 #3 Well, we think we could fix the origin of the problem, but we aren´t able to solve. It seems to be placed in the library itself. In version 1.28 it´s still present, but the method is missing since version 1.50. See the attached picture. Attachments markerclass.JPG 76.9 KB · Views: 764 Upvote 0
Well, we think we could fix the origin of the problem, but we aren´t able to solve. It seems to be placed in the library itself. In version 1.28 it´s still present, but the method is missing since version 1.50. See the attached picture.
B bvonlaar Member Licensed User Longtime User Apr 25, 2017 #4 DonManfred said: Hmmm... B4X: Expand Collapse Copy googlemap.removemarker(MMark) ? Click to expand... Well, I tried also your way, but I got an error message that before use of MMark as Marker I should initialize it. But I found no way how do initialize the object Marker. Where did you found the method removemarker? In the library discription I didn´t found anything. Best Benedikt Upvote 0
DonManfred said: Hmmm... B4X: Expand Collapse Copy googlemap.removemarker(MMark) ? Click to expand... Well, I tried also your way, but I got an error message that before use of MMark as Marker I should initialize it. But I found no way how do initialize the object Marker. Where did you found the method removemarker? In the library discription I didn´t found anything. Best Benedikt
DonManfred Expert Licensed User Longtime User Apr 25, 2017 #5 bvonlaar said: that before use of MMark as Marker I should initialize it Click to expand... B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) ' gmap.removemarker(MMark) to remove the added marker bvonlaar said: Where did you found the method removemarker? Click to expand... I downloaded the library and had a look at the library XML to find references to "marker"... PD: Honestly i did not used any GoogleMap inside B4J apps so far... Just tried to help here. Upvote 0
bvonlaar said: that before use of MMark as Marker I should initialize it Click to expand... B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) ' gmap.removemarker(MMark) to remove the added marker bvonlaar said: Where did you found the method removemarker? Click to expand... I downloaded the library and had a look at the library XML to find references to "marker"... PD: Honestly i did not used any GoogleMap inside B4J apps so far... Just tried to help here.
R rboeck Well-Known Member Licensed User Longtime User Apr 25, 2017 #6 My version of google maps for b4j is 1.61 As you can see, there is RemoveMarke inside. Upvote 0
DonManfred Expert Licensed User Longtime User Apr 25, 2017 #7 rboeck said: there is RemoveMarke inside Click to expand... The issue here is that he did not realized that one need to use gmap.AddMarker to get an Initialized Markerobject. You can´t create one by code only (without using gmap). My code B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) is based on the GoogeMaps-Example code B4X: Expand Collapse Copy Sub gmap_Ready btnResetMap.Enabled = True btnJumpToEiffel.Enabled = True For i = 1 To 10 Dim m As Marker = gmap.AddMarker(10 * i, 10 * i, "Marker #" & i) AttachInfoWindow(m, "Some text " & i) Next End Sub Upvote 0
rboeck said: there is RemoveMarke inside Click to expand... The issue here is that he did not realized that one need to use gmap.AddMarker to get an Initialized Markerobject. You can´t create one by code only (without using gmap). My code B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) is based on the GoogeMaps-Example code B4X: Expand Collapse Copy Sub gmap_Ready btnResetMap.Enabled = True btnJumpToEiffel.Enabled = True For i = 1 To 10 Dim m As Marker = gmap.AddMarker(10 * i, 10 * i, "Marker #" & i) AttachInfoWindow(m, "Some text " & i) Next End Sub
B bvonlaar Member Licensed User Longtime User Apr 25, 2017 #8 rboeck said: My version of google maps for b4j is 1.61View attachment 55059 As you can see, there is RemoveMarke inside. Click to expand... Well, I think I have 2 problems. When I try to overcome my problems I have different Browser windows open with different threads which belong to set and remove marker. Also the documentation of jgooglemaps is open. My focus was upon all you find under Marker theme. When I started the thread I had only the method marker.remove in my focus not googlemaps.removemarker. In Ver 1.28 is marker.remove available in Ver 1.61 not. In the library discription you can see marker.IsInitialized, marker.Position, marker.Remove, marker.Title, marker.Visible. A lot of threads work with marker.remove. I didn´t talk about googlemap.removemarker. So I was confused about the first answer from DonManfred, because in the member discription of the library googlemap.Removemarker isn´t listed. Attachments ImgRemove.jpg 48.8 KB · Views: 708 Upvote 0
rboeck said: My version of google maps for b4j is 1.61View attachment 55059 As you can see, there is RemoveMarke inside. Click to expand... Well, I think I have 2 problems. When I try to overcome my problems I have different Browser windows open with different threads which belong to set and remove marker. Also the documentation of jgooglemaps is open. My focus was upon all you find under Marker theme. When I started the thread I had only the method marker.remove in my focus not googlemaps.removemarker. In Ver 1.28 is marker.remove available in Ver 1.61 not. In the library discription you can see marker.IsInitialized, marker.Position, marker.Remove, marker.Title, marker.Visible. A lot of threads work with marker.remove. I didn´t talk about googlemap.removemarker. So I was confused about the first answer from DonManfred, because in the member discription of the library googlemap.Removemarker isn´t listed.
B bvonlaar Member Licensed User Longtime User Apr 25, 2017 #9 DonManfred said: The issue here is that he did not realized that one need to use gmap.AddMarker to get an Initialized Markerobject. You can´t create one by code only (without using gmap). My code B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) is based on the GoogeMaps-Example code B4X: Expand Collapse Copy Sub gmap_Ready btnResetMap.Enabled = True btnJumpToEiffel.Enabled = True For i = 1 To 10 Dim m As Marker = gmap.AddMarker(10 * i, 10 * i, "Marker #" & i) AttachInfoWindow(m, "Some text " & i) Next End Sub Click to expand... Yes, DonManfred, you are right, I lost of focus that marker object is initialized quite different like other objects. But second, please see my answer to rboek, I don´t understand the differences in the documentation and whether marker.remove and googlemap.removemarker work identical. But I will now try to handle "removemarker". The first attempts last night failed. ....we never surrender ;-) Upvote 0
DonManfred said: The issue here is that he did not realized that one need to use gmap.AddMarker to get an Initialized Markerobject. You can´t create one by code only (without using gmap). My code B4X: Expand Collapse Copy Dim MMark as Marker = gmap.AddMarker(lat,lon) is based on the GoogeMaps-Example code B4X: Expand Collapse Copy Sub gmap_Ready btnResetMap.Enabled = True btnJumpToEiffel.Enabled = True For i = 1 To 10 Dim m As Marker = gmap.AddMarker(10 * i, 10 * i, "Marker #" & i) AttachInfoWindow(m, "Some text " & i) Next End Sub Click to expand... Yes, DonManfred, you are right, I lost of focus that marker object is initialized quite different like other objects. But second, please see my answer to rboek, I don´t understand the differences in the documentation and whether marker.remove and googlemap.removemarker work identical. But I will now try to handle "removemarker". The first attempts last night failed. ....we never surrender ;-)
Erel B4X founder Staff member Licensed User Longtime User Apr 25, 2017 #10 Marker.Remove is no longer available, due to a change in GMapFX API. You should instead use GoogleMap.RemoveMarker. Upvote 0
Marker.Remove is no longer available, due to a change in GMapFX API. You should instead use GoogleMap.RemoveMarker.
B bvonlaar Member Licensed User Longtime User Apr 25, 2017 #11 Erel said: Marker.Remove is no longer available, due to a change in GMapFX API. You should instead use GoogleMap.RemoveMarker. Click to expand... Thanks for clearing the fact. But I have strong trouble with "RemoveMarker". In simple structures it works, but in more complex routines until now it fails. Benedikt Upvote 0
Erel said: Marker.Remove is no longer available, due to a change in GMapFX API. You should instead use GoogleMap.RemoveMarker. Click to expand... Thanks for clearing the fact. But I have strong trouble with "RemoveMarker". In simple structures it works, but in more complex routines until now it fails. Benedikt
B bvonlaar Member Licensed User Longtime User Apr 25, 2017 #12 bvonlaar said: Thanks for clearing the fact. But I have strong trouble with "RemoveMarker". In simple structures it works, but in more complex routines until now it fails. Benedikt Click to expand... I have to correct my last statement. The error was by myself. I over counted a For...to...Next loop and the last position was set into nothing. Thanks again Benedikt Upvote 0
bvonlaar said: Thanks for clearing the fact. But I have strong trouble with "RemoveMarker". In simple structures it works, but in more complex routines until now it fails. Benedikt Click to expand... I have to correct my last statement. The error was by myself. I over counted a For...to...Next loop and the last position was set into nothing. Thanks again Benedikt