Ciao ragazzi e buongiorno, allora forse ho trovato il vero problema, che non il codice, ma la rigidit dell’oggetto webMap, esempio, in molte schede faccio uso di questa classe MapView in questo modo, o passando indirizzo direttamente da field di ricerca, non so che cosa combina la classe WebMapLocation, ma spesso questa va in crash per i fatti suoi, esempio se scrivo "Hotel Milano, Milano tutto e perfetto, ma se scrivo “Hotel exe Paris Centre, paris” questo va in crash, pur esistendo hotel
Hotel Milano
Hotel exe Paris Center
if Session.IOActivity = "Super Admin" or Session.IOActivity = "Admin" then
self.Button_edit.Enabled = true
else
self.Button_edit.Enabled = false
end if
dim value() as string = Split(self.G_Record(Row),"|")
self.TextArea_content.Text = value(2)
self.TextField_phone.Text = value(3)
self.TextField_phone.HelpTag = "Phone"
self.TextField_mobile.Text = value(5)
self.TextField_mobile.HelpTag = "Mobile"
if value(6) <> "" then
self.Button_info.Enabled = true
self.Button_info.HelpTag = value(6)
end if
try
self.ImageView1.URL = value(8)
Catch
self.ImageView1.URL = "http://www.humanequality.eu/001/images/humanequaliy.png"
end try
Try
if self.mp <> nil then
self.MapViewer1.RemoveLocation(mp)
end if
self.mp = new WebMapLocation
self.mp.Address = value(10) + " , " + Value(12) + " " + value(13)
self.MapViewer1.AddLocation(self.mp)
self.MapViewer1.GoToLocation(self.mp)
Catch
end try
if self.TextField_full_name.Text = "" Then
self.TextField_full_name.Text = "Hotel Milano, Milano"
end if
if wl <> nil then
self.MapViewer1.RemoveLocation(wl)
end if
try
wl = new WebMapLocation
wl.Address = self.TextField_full_name.Text
self.MapViewer1.AddLocation(wl)
self.MapViewer1.GoToLocation(wl)
Catch
MsgBox("Andress not valid")
end try
dim s as String = self.SearchField1.Text
if s = "" then return
dim wml as new WebMapLocation
dim wml1 as new WebMapLocation
try
wml1.Address = self.TextField5.Text
wml.Address = s
if wml.Address <> "" Then
self.TextField1.Text = wml.Address
self.TextField2.Text = wml.Latitude.ToText
self.TextField3.Text = wml.Longitude.ToText
self.TextField4.Text = "Distanza da " + self.TextField5.Text + " " + wml.DistanceTo(wml1).ToText + " km"
self.TextField7.Text = str(TextField6.Text.Val * wml.DistanceTo(wml1) )
self.TextField10.Text = str( TextField7.Text.Val / TextField8.Text.Val )
end if
self.MapViewer1.GoToLocation(wml)
self.MapViewer1.AddLocation(wml)
self.MapViewer1.AddLocation(wml1)
Catch
MsgBox "Error location"
return
end try
try
dim mapaddress as new WebMapLocation
mapaddress.Address = self.Label_address.Text + " , " + self.Label_city.Text + " " + self.Label_state.Text
self.MapViewer1.AddLocation(mapaddress)
self.MapViewer1.GoToLocation(mapaddress)
catch
MsgBox "Error location"
end try
certo magari dovrei farmi una classetta per non ripetere tutti questi codici inutili, ma volevo farlo poi, proverei ad eliminare tutte le mappe, magari se qualcuno ha un idea di come sostituirle come obj di xojo, perch non solo va in bomba ma rallenta notevolmente tutti i processi. sar un idiozia, ma mi succede, ora infatti in molte occasione dato che ho messo tutto sotto try, consigli ne avete da passare!