Skip to content

Commit

Permalink
Merge pull request MoSync#394 from spiridon-alexandru/ThreeTwoOne
Browse files Browse the repository at this point in the history
Map crash fixed
  • Loading branch information
milesm committed Mar 7, 2013
2 parents c431e67 + 762c167 commit e17b192
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
13 changes: 13 additions & 0 deletions examples/cpp/NativeUIMap/Readme.txt
Original file line number Diff line number Diff line change
@@ -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");
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using System.Text.RegularExpressions;
using System.Reflection;
using System.Windows.Media;
using System.Globalization;

namespace MoSync
{
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion testPrograms/native_ui_lib/MapTest/MainScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
13 changes: 13 additions & 0 deletions testPrograms/native_ui_lib/MapTest/Readme.txt
Original file line number Diff line number Diff line change
@@ -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");

0 comments on commit e17b192

Please sign in to comment.