diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Maps.WP8 | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.Maps.WP8')
-rw-r--r-- | Xamarin.Forms.Maps.WP8/FormsMaps.cs | 29 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/GeocoderBackend.cs | 95 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/MapRenderer.cs | 250 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Properties/AssemblyInfo.cs | 26 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/README_FIRST.txt | 3 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Add.png | bin | 0 -> 339 bytes | |||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Cancel.png | bin | 0 -> 350 bytes | |||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Check.png | bin | 0 -> 414 bytes | |||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Delete.png | bin | 0 -> 445 bytes | |||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Select.png | bin | 0 -> 863 bytes | |||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/Xamarin.Forms.Maps.WP8.csproj | 167 | ||||
-rw-r--r-- | Xamarin.Forms.Maps.WP8/packages.config | 4 |
12 files changed, 574 insertions, 0 deletions
diff --git a/Xamarin.Forms.Maps.WP8/FormsMaps.cs b/Xamarin.Forms.Maps.WP8/FormsMaps.cs new file mode 100644 index 00000000..0f169d3d --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/FormsMaps.cs @@ -0,0 +1,29 @@ +using Xamarin.Forms.Maps.WP8; + +namespace Xamarin +{ + public static class FormsMaps + { + static bool s_isInitialized; + + internal static string ApplicationId { get; set; } + + internal static string AuthenticationToken { get; set; } + + public static void Init() + { + if (s_isInitialized) + return; + GeocoderBackend.Register(); + s_isInitialized = true; + } + + public static void Init(string applicationId, string authenticationToken) + { + ApplicationId = applicationId; + AuthenticationToken = authenticationToken; + + Init(); + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Maps.WP8/GeocoderBackend.cs b/Xamarin.Forms.Maps.WP8/GeocoderBackend.cs new file mode 100644 index 00000000..e46ec702 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/GeocoderBackend.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Device.Location; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Phone.Maps.Services; + +namespace Xamarin.Forms.Maps.WP8 +{ + internal class GeocoderBackend + { + // Eventually this should be sanely set to match either where the map is centered or where the user is. + internal static Position PositionForGeocoding { get; set; } + + public static void Register() + { + Geocoder.GetPositionsForAddressAsyncFunc = GetPositionsForAddress; + Geocoder.GetAddressesForPositionFuncAsync = GetAddressesForPositionAsync; + } + + // Thank you to craig dunn + static string AddressToString(MapAddress address) + { + string building = "", house = "", city = "", country = ""; + + var bldg = new List<string>(); + if (!"".Equals(address.BuildingRoom)) + bldg.Add(address.BuildingRoom); + if (!"".Equals(address.BuildingFloor)) + bldg.Add(address.BuildingFloor); + if (!"".Equals(address.BuildingName)) + bldg.Add(address.BuildingName); + if (!"".Equals(address.BuildingZone)) + bldg.Add(address.BuildingZone); + if (bldg.Count > 0) + building = string.Join(" ", bldg) + Environment.NewLine; + + var hs = new List<string>(); + if (!"".Equals(address.HouseNumber)) + hs.Add(address.HouseNumber); + if (!"".Equals(address.Street)) + hs.Add(address.Street); + if (hs.Count > 0) + house = string.Join(" ", hs) + Environment.NewLine; + + var cs = new List<string>(); + if (!"".Equals(address.City)) + cs.Add(address.City); + if (!"".Equals(address.State)) + cs.Add(address.State); + else if (!"".Equals(address.Province)) + cs.Add(address.Province); + if (!"".Equals(address.PostalCode)) + cs.Add(address.PostalCode); + if (cs.Count > 0) + city = string.Join(" ", cs) + Environment.NewLine; + + if (!"".Equals(address.Country)) + country = address.Country; + return building + house + city + country; + } + + static Task<IEnumerable<string>> GetAddressesForPositionAsync(Position position) + { + var source = new TaskCompletionSource<IEnumerable<string>>(); + + var query = new ReverseGeocodeQuery + { + GeoCoordinate = new GeoCoordinate(position.Latitude, position.Longitude) + }; + query.QueryCompleted += + (sender, args) => source.SetResult(args.Result.Select(r => AddressToString(r.Information.Address)).ToArray()); + query.QueryAsync(); + + return source.Task; + } + + static Task<IEnumerable<Position>> GetPositionsForAddress(string s) + { + var source = new TaskCompletionSource<IEnumerable<Position>>(); + var query = new GeocodeQuery + { + SearchTerm = s, + GeoCoordinate = new GeoCoordinate(PositionForGeocoding.Latitude, PositionForGeocoding.Longitude) + }; + query.QueryCompleted += + (sender, args) => + source.SetResult( + args.Result.Select(r => new Position(r.GeoCoordinate.Latitude, r.GeoCoordinate.Longitude)).ToArray()); + query.QueryAsync(); + + return source.Task; + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Maps.WP8/MapRenderer.cs b/Xamarin.Forms.Maps.WP8/MapRenderer.cs new file mode 100644 index 00000000..eaac51d2 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/MapRenderer.cs @@ -0,0 +1,250 @@ +using System; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Device.Location; +using System.Linq; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Shapes; +using Windows.Devices.Geolocation; +using Microsoft.Phone.Maps; +using Microsoft.Phone.Maps.Controls; +using Microsoft.Phone.Maps.Toolkit; +using Xamarin.Forms.Platform.WinPhone; + +namespace Xamarin.Forms.Maps.WP8 +{ + public class + MapRenderer : ViewRenderer<Map, Microsoft.Phone.Maps.Controls.Map> + { + bool _firstZoomLevelChangeFired; + MapLayer _pushPinLayer; + MapLayer _userLocationLayer; + + protected override void OnElementChanged(ElementChangedEventArgs<Map> e) + { + base.OnElementChanged(e); + + SetNativeControl(new Microsoft.Phone.Maps.Controls.Map()); + UpdateMapType(); + + Control.Loaded += ControlOnLoaded; + + _pushPinLayer = new MapLayer(); + Control.Layers.Add(_pushPinLayer); + + _userLocationLayer = new MapLayer(); + Control.Layers.Add(_userLocationLayer); + + Control.ViewChanged += (s, a) => UpdateVisibleRegion(); + Control.ZoomLevelChanged += (sender, args) => UpdateVisibleRegion(); + Control.CenterChanged += (s, a) => UpdateVisibleRegion(); + //Control.ViewChangeOnFrame += (s, a) => UpdateVisibleRegion (); + + MessagingCenter.Subscribe<Map, MapSpan>(this, "MapMoveToRegion", (s, a) => MoveToRegion(a), Element); + + ((ObservableCollection<Pin>)Element.Pins).CollectionChanged += OnCollectionChanged; + + if (Element.Pins.Any()) + LoadPins(); + + UpdateShowUserLocation(); + } + + async void UpdateShowUserLocation() + { + if (Element.IsShowingUser) + { + var myGeolocator = new Geolocator(); + + if (myGeolocator.LocationStatus != PositionStatus.NotAvailable && + myGeolocator.LocationStatus != PositionStatus.Disabled) + { + var userPosition = await myGeolocator.GetGeopositionAsync(); + if (userPosition?.Coordinate != null) + LoadUserPosition(userPosition.Coordinate, true); + } + } + else if (_userLocationLayer.Count > 0) + _userLocationLayer.Clear(); + } + + void ControlOnLoaded(object sender, RoutedEventArgs routedEventArgs) + { + MapsSettings.ApplicationContext.ApplicationId = FormsMaps.ApplicationId; + MapsSettings.ApplicationContext.AuthenticationToken = FormsMaps.AuthenticationToken; + } + + void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + switch (e.Action) + { + case NotifyCollectionChangedAction.Add: + foreach (Pin pin in e.NewItems) + LoadPin(pin); + break; + case NotifyCollectionChangedAction.Move: + // no matter + break; + case NotifyCollectionChangedAction.Remove: + foreach (Pin pin in e.OldItems) + RemovePin(pin); + break; + case NotifyCollectionChangedAction.Replace: + foreach (Pin pin in e.OldItems) + RemovePin(pin); + foreach (Pin pin in e.NewItems) + LoadPin(pin); + break; + case NotifyCollectionChangedAction.Reset: + _pushPinLayer.Clear(); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + + void UpdateVisibleRegion() + { + if (!_firstZoomLevelChangeFired) + { + MoveToRegion(Element.LastMoveToRegion, MapAnimationKind.None); + _firstZoomLevelChangeFired = true; + return; + } + + var center = new Position(Control.Center.Latitude, Control.Center.Longitude); + var topLeft = Control.ConvertViewportPointToGeoCoordinate(new System.Windows.Point(0, 0)); + var bottomRight = + Control.ConvertViewportPointToGeoCoordinate(new System.Windows.Point(Control.ActualWidth, Control.ActualHeight)); + if (topLeft == null || bottomRight == null) + return; + + var boundingRegion = LocationRectangle.CreateBoundingRectangle(topLeft, bottomRight); + var result = new MapSpan(center, boundingRegion.HeightInDegrees, boundingRegion.WidthInDegrees); + Element.VisibleRegion = result; + } + + void LoadPins() + { + foreach (var pin in Element.Pins) + LoadPin(pin); + } + + void LoadPin(Pin pin) + { + var location = new GeoCoordinate(pin.Position.Latitude, pin.Position.Longitude); + var pushPin = new Pushpin + { + Content = pin.Label, + PositionOrigin = new System.Windows.Point(0, 1), + Tag = pin + }; + + pushPin.Tap += PinTap; + + var pushPinOverlay = new MapOverlay + { + Content = pushPin, + GeoCoordinate = location, + PositionOrigin = new System.Windows.Point(0, 1) + }; + _pushPinLayer.Add(pushPinOverlay); + } + + void PinTap(object sender, GestureEventArgs e) + { + var pushPin = (Pushpin)sender; + var pin = (Pin)pushPin.Tag; + pin.SendTap(); + } + + void RemovePin(Pin pin) + { + var child = _pushPinLayer.FirstOrDefault(p => ((Pushpin)p.Content).Tag == pin); + if (child != null) + _pushPinLayer.Remove(child); + } + + void MoveToRegion(MapSpan span, MapAnimationKind animation = MapAnimationKind.Parabolic) + { + // FIXME + var center = new GeoCoordinate(span.Center.Latitude, span.Center.Longitude); + var location = new LocationRectangle(center, span.LongitudeDegrees, span.LatitudeDegrees); + Control.SetView(location, animation); + } + + public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint) + { + return new SizeRequest(new Size(100, 100)); + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + base.OnElementPropertyChanged(sender, e); + + if (e.PropertyName == Map.MapTypeProperty.PropertyName) + UpdateMapType(); + if (e.PropertyName == Map.IsShowingUserProperty.PropertyName) + UpdateShowUserLocation(); + } + + void UpdateMapType() + { + switch (Element.MapType) + { + case MapType.Street: + Control.CartographicMode = MapCartographicMode.Road; + break; + case MapType.Satellite: + Control.CartographicMode = MapCartographicMode.Aerial; + break; + case MapType.Hybrid: + Control.CartographicMode = MapCartographicMode.Hybrid; + break; + } + } + + void LoadUserPosition(Geocoordinate userPosition, bool center = false) + { + _userLocationLayer.Clear(); + + var userCoordinate = new GeoCoordinate + ( + userPosition.Latitude, + userPosition.Longitude, + userPosition.Altitude ?? double.NaN, + userPosition.Accuracy, + userPosition.AltitudeAccuracy ?? double.NaN, + userPosition.Speed ?? double.NaN, + userPosition.Heading ?? double.NaN + ); + + //make some preety? + var userPositionCircle = new Ellipse + { + Fill = new SolidColorBrush(Colors.Blue), + Height = 20, + Width = 20, + Opacity = 50 + }; + + var userPostionOverlay = new MapOverlay + { + Content = userPositionCircle, + PositionOrigin = new System.Windows.Point(0.5, 0.5), + GeoCoordinate = userCoordinate + }; + + _userLocationLayer.Add(userPostionOverlay); + + if (center) + { + Control.Center = userCoordinate; + Control.ZoomLevel = 13; + } + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Maps.WP8/Properties/AssemblyInfo.cs b/Xamarin.Forms.Maps.WP8/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..378d6520 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; +using Xamarin.Forms; +using Xamarin.Forms.Maps; +using Xamarin.Forms.Maps.WP8; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. + +[assembly: AssemblyTitle("Xamarin.Forms.Maps.WP8")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. + +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM + +[assembly: Guid("9222d2b8-63a4-4a36-a80e-bc34f27e0951")] +[assembly: NeutralResourcesLanguage("en-US")] +[assembly: ExportRenderer(typeof (Map), typeof (MapRenderer))]
\ No newline at end of file diff --git a/Xamarin.Forms.Maps.WP8/README_FIRST.txt b/Xamarin.Forms.Maps.WP8/README_FIRST.txt new file mode 100644 index 00000000..fc7fc06d --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/README_FIRST.txt @@ -0,0 +1,3 @@ +For the Windows Phone toolkit make sure that you have +marked the icons in the "Toolkit.Content" folder as content. That way they +can be used as the icons for the ApplicationBar control. diff --git a/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Add.png b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Add.png Binary files differnew file mode 100644 index 00000000..4b524d6f --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Add.png diff --git a/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Cancel.png b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Cancel.png Binary files differnew file mode 100644 index 00000000..4dd724f0 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Cancel.png diff --git a/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Check.png b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Check.png Binary files differnew file mode 100644 index 00000000..7a074666 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Check.png diff --git a/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Delete.png b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Delete.png Binary files differnew file mode 100644 index 00000000..95bb16da --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Delete.png diff --git a/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Select.png b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Select.png Binary files differnew file mode 100644 index 00000000..995deaaa --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Toolkit.Content/ApplicationBar.Select.png diff --git a/Xamarin.Forms.Maps.WP8/Xamarin.Forms.Maps.WP8.csproj b/Xamarin.Forms.Maps.WP8/Xamarin.Forms.Maps.WP8.csproj new file mode 100644 index 00000000..512244b8 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/Xamarin.Forms.Maps.WP8.csproj @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.20506</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{9222D2B8-63A4-4A36-A80E-BC34F27E0951}</ProjectGuid> + <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Xamarin.Forms.Maps.WP8</RootNamespace> + <AssemblyName>Xamarin.Forms.Maps.WP8</AssemblyName> + <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> + <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> + <SilverlightApplication>false</SilverlightApplication> + <ValidateXaml>true</ValidateXaml> + <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> + <ThrowErrorsInValidation>true</ThrowErrorsInValidation> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>Bin\Debug</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>Bin\Release</OutputPath> + <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>Bin\x86\Debug</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>Bin\x86\Release</OutputPath> + <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>Bin\ARM\Debug</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>Bin\ARM\Release</OutputPath> + <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Turkey\</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Turkey\</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|ARM'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\ARM\Turkey\</OutputPath> + <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants> + <NoStdLib>true</NoStdLib> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Compile Include="..\Xamarin.Forms.Core\Properties\GlobalAssemblyInfo.cs"> + <Link>Properties\GlobalAssemblyInfo.cs</Link> + </Compile> + <Compile Include="MapRenderer.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="FormsMaps.cs" /> + <Compile Include="GeocoderBackend.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj"> + <Project>{57B8B73D-C3B5-4C42-869E-7B2F17D354AC}</Project> + <Name>Xamarin.Forms.Core</Name> + </ProjectReference> + <ProjectReference Include="..\Xamarin.Forms.Maps\Xamarin.Forms.Maps.csproj"> + <Project>{7D13BAC2-C6A4-416A-B07E-C169B199E52B}</Project> + <Name>Xamarin.Forms.Maps</Name> + </ProjectReference> + <ProjectReference Include="..\Xamarin.Forms.Platform.WP8\Xamarin.Forms.Platform.WP8.csproj"> + <Project>{517B6AE0-792B-4665-9376-5CA33E539181}</Project> + <Name>Xamarin.Forms.Platform.WP8</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="README_FIRST.txt" /> + <Content Include="Toolkit.Content\ApplicationBar.Add.png" /> + <Content Include="Toolkit.Content\ApplicationBar.Cancel.png" /> + <Content Include="Toolkit.Content\ApplicationBar.Check.png" /> + <Content Include="Toolkit.Content\ApplicationBar.Delete.png" /> + <Content Include="Toolkit.Content\ApplicationBar.Select.png" /> + </ItemGroup> + <ItemGroup> + <Reference Include="Microsoft.Phone.Controls.Toolkit"> + <HintPath>..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" /> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" /> + <ProjectExtensions /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> diff --git a/Xamarin.Forms.Maps.WP8/packages.config b/Xamarin.Forms.Maps.WP8/packages.config new file mode 100644 index 00000000..d534d6e7 --- /dev/null +++ b/Xamarin.Forms.Maps.WP8/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="WPtoolkit" version="4.2013.08.16" targetFramework="wp80" /> +</packages> |