Hi,
We fixed the problem. We replaced the IsNumeric function by Double.TryParse with a format provider.
To solve this issue, you will have to modify the code of the project
DotNetNuke.Map.Sources.Standard in the file
Standard.Data.ascx.vb in function
SetData line 459 :
Current code is :
If variables.ContainsKey("latitude") AndAlso IsNumeric(variables("latitude")) Then
point.Latitude = Double.Parse(variables("latitude"), System.Globalization.CultureInfo.InvariantCulture)
Else
point.Latitude = -1
End If
If variables.ContainsKey("longitude") AndAlso IsNumeric(variables("longitude")) Then
point.Longitude = Double.Parse(variables("longitude"), System.Globalization.CultureInfo.InvariantCulture)
Else
point.Longitude = -1
End If
Fixed code is :
If Not (variables.ContainsKey("latitude") AndAlso Double.TryParse(
variables("latitude"),
Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture,
point.Latitude)) Then
point.Latitude = -1
End If
If Not (variables.ContainsKey("longitude") AndAlso Double.TryParse(
variables("longitude"),
Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture,
point.Longitude)) Then
point.Longitude = -1
End If
You will have to modify the code of the project
DotNetNuke.Map.
Visuals in the file
Configuration.vb line 57 and 69 :
Current code :
Public Property Latitude() As String
Get
If _Latitude Is Nothing OrElse Not IsNumeric(_Latitude) Then
Return "0.0"
End If
Return _Latitude
End Get
Set(ByVal Value As String)
_Latitude = Value
End Set
End Property
Public Property Longitude() As String
Get
If _Longitude Is Nothing OrElse Not IsNumeric(_Longitude) Then
Return "0.0"
End If
Return _Longitude
End Get
Set(ByVal Value As String)
_Longitude = Value
End Set
End Property
Fixed code
Public Property Latitude() As String
Get
Dim lat As Double
If _Latitude Is Nothing OrElse Not Double.TryParse(_Latitude, Globalization.NumberStyles.Any,
Globalization.CultureInfo.InvariantCulture, lat) Then
Return "0.0"
End If
Return _Latitude
End Get
Set(ByVal Value As String)
_Latitude = Value
End Set
End Property
Public Property Longitude() As String
Get
Dim lng As Double
If _Longitude Is Nothing OrElse Not Double.TryParse(_Longitude, Globalization.NumberStyles.Any,
Globalization.CultureInfo.InvariantCulture, lng) Then
Return "0.0"
End If
Return _Longitude
End Get
Set(ByVal Value As String)
_Longitude = Value
End Set
End Property
I hope this will help, and will be included in the basic code :)
Olivier