diff --git a/examples/cpp/NativeUIMap/Readme.txt b/examples/cpp/NativeUIMap/Readme.txt new file mode 100644 index 000000000..07df877f2 --- /dev/null +++ b/examples/cpp/NativeUIMap/Readme.txt @@ -0,0 +1,13 @@ +Purpose: +The test program shows the native ui map functionality and provides UI elements for doing +the following: + - add/remove multiple random map pins + - set/get visible area + - set zoom level + - center the map + - a map control is visible and available for interraction to the user + +IMPORTANT: + ADD YOU OWN MAP CREDENTIALS INSIDE THE MAP CONSTRUCTOR: + MainScreen.cpp: + mMap = new Map("google maps test credentials", "bing maps test credentials"); \ No newline at end of file diff --git a/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Source/Modules/NativeUI/MoSyncLabel.cs b/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Source/Modules/NativeUI/MoSyncLabel.cs index dc114801d..2831a7cb2 100644 --- a/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Source/Modules/NativeUI/MoSyncLabel.cs +++ b/runtimes/csharp/windowsphone/mosync/mosyncRuntime/Source/Modules/NativeUI/MoSyncLabel.cs @@ -16,6 +16,7 @@ using System.Text.RegularExpressions; using System.Reflection; using System.Windows.Media; +using System.Globalization; namespace MoSync { @@ -207,7 +208,9 @@ public String fontSize set { double size = 0; - if (double.TryParse(value, out size)) + NumberStyles style = NumberStyles.AllowDecimalPoint; + IFormatProvider provider = CultureInfo.InvariantCulture; + if (Double.TryParse(value, style, provider, out size)) { // for some values better use the default size of the platform mLabel.FontSize = size <= 0 ? 11 : size; diff --git a/testPrograms/native_ui_lib/MapTest/MainScreen.cpp b/testPrograms/native_ui_lib/MapTest/MainScreen.cpp index 271aa33ff..4df847187 100644 --- a/testPrograms/native_ui_lib/MapTest/MainScreen.cpp +++ b/testPrograms/native_ui_lib/MapTest/MainScreen.cpp @@ -97,7 +97,7 @@ void MainScreen::createMainLayout() { mMainLayout->addChild(mSetCenterButton); // create the main map and add it to the main layout - mMap = new Map("google test credentials", "AsIe6nHOHjIuf9MQS4fW7up92BO6HuCwspKJqYwffZiqUJsgXuLIXeBdCf9EM4yz"); + mMap = new Map("google test credentials", "AuQ7GMB3AJPFp5GPHbuQ2WVyhQUd9DjYJ6u5aR6a_uXZZdX5KuHJ7XMU4GNvO6mh"); mMap->fillSpaceHorizontally(); mMap->fillSpaceVertically(); diff --git a/testPrograms/native_ui_lib/MapTest/Readme.txt b/testPrograms/native_ui_lib/MapTest/Readme.txt new file mode 100644 index 000000000..07df877f2 --- /dev/null +++ b/testPrograms/native_ui_lib/MapTest/Readme.txt @@ -0,0 +1,13 @@ +Purpose: +The test program shows the native ui map functionality and provides UI elements for doing +the following: + - add/remove multiple random map pins + - set/get visible area + - set zoom level + - center the map + - a map control is visible and available for interraction to the user + +IMPORTANT: + ADD YOU OWN MAP CREDENTIALS INSIDE THE MAP CONSTRUCTOR: + MainScreen.cpp: + mMap = new Map("google maps test credentials", "bing maps test credentials"); \ No newline at end of file