-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from amay077/develop
v1.3.0
- Loading branch information
Showing
28 changed files
with
3,367 additions
and
2,760 deletions.
There are no files selected for viewing
5,539 changes: 2,795 additions & 2,744 deletions
5,539
XFGoogleMapSample/Droid/Resources/Resource.designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps" | ||
x:Class="XFGoogleMapSample.TilesPage" | ||
Title="Tiles"> | ||
<ContentPage.Content> | ||
<StackLayout | ||
VerticalOptions="Fill" | ||
Orientation="Vertical"> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
|
||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Button x:Name="buttonORMTile" | ||
Text="OpenRailwayMap (512px)" | ||
Grid.Row="1" | ||
Grid.Column="1"/> | ||
<Button x:Name="buttonJGSITile" | ||
Text="Japan GSI" | ||
Grid.Row="1" | ||
Grid.Column="2"/> | ||
|
||
<Button x:Name="buttonSyncImage" | ||
Text="Image (Sync)" | ||
Grid.Row="2" | ||
Grid.Column="1"/> | ||
<Button x:Name="buttonAsyncImage" | ||
Text="Image (Async)" | ||
Grid.Row="2" | ||
Grid.Column="2"/> | ||
|
||
<Button x:Name="buttonRemove" | ||
Text="Remove Tile" | ||
Grid.Row="3" | ||
Grid.Column="1" | ||
Grid.ColumnSpan="2"/> | ||
</Grid> | ||
|
||
<maps:Map x:Name="map" | ||
VerticalOptions="FillAndExpand"/> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Xamarin.Forms" version="2.3.0.49" targetFramework="portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarintvos10+xamarinwatchos10+xamarinios10" /> | ||
<package id="Xamarin.Forms.GoogleMaps" version="1.2.0" targetFramework="portable45-net45+win8+wp8" /> | ||
<package id="Xamarin.Forms.GoogleMaps" version="1.3.0" targetFramework="portable45-net45+win8+wp8" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Xamarin.Forms.GoogleMaps/Xamarin.Forms.GoogleMaps.Android/NAsyncTileLayer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Android.Gms.Maps.Model; | ||
using IATileProvider = Android.Gms.Maps.Model.ITileProvider; | ||
|
||
namespace Xamarin.Forms.GoogleMaps.Android | ||
{ | ||
internal class NAsyncTileLayer : Java.Lang.Object, IATileProvider | ||
{ | ||
private Func<int, int, int, Task<byte[]>> _tileImageAsync; | ||
private int _tileSize; | ||
|
||
public NAsyncTileLayer(Func<int, int, int, Task<byte[]>> tileImageAsync, int tileSize = 256) : base() | ||
{ | ||
_tileImageAsync = tileImageAsync; | ||
_tileSize = tileSize; | ||
} | ||
|
||
public Tile GetTile(int x, int y, int zoom) | ||
{ | ||
var imgByte = _tileImageAsync(x, y, zoom).Result; | ||
return new Tile(_tileSize, _tileSize, imgByte); | ||
} | ||
} | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
Xamarin.Forms.GoogleMaps/Xamarin.Forms.GoogleMaps.Android/NSyncTileLayer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using Android.Gms.Maps.Model; | ||
using IATileProvider = Android.Gms.Maps.Model.ITileProvider; | ||
|
||
namespace Xamarin.Forms.GoogleMaps.Android | ||
{ | ||
internal class NSyncTileLayer : Java.Lang.Object, IATileProvider | ||
{ | ||
private Func<int, int, int, byte[]> _tileImageSync; | ||
private int _tileSize; | ||
|
||
public NSyncTileLayer(Func<int, int, int, byte[]> tileImageSync, int tileSize = 256) : base() | ||
{ | ||
_tileImageSync = tileImageSync; | ||
_tileSize = tileSize; | ||
} | ||
|
||
public Tile GetTile(int x, int y, int zoom) | ||
{ | ||
var imgByte = _tileImageSync(x, y, zoom); | ||
return new Tile(_tileSize, _tileSize, imgByte); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Xamarin.Forms.GoogleMaps/Xamarin.Forms.GoogleMaps.Android/NUrlTileLayer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using Android.Gms.Maps.Model; | ||
|
||
namespace Xamarin.Forms.GoogleMaps.Android | ||
{ | ||
internal class NUrlTileLayer : UrlTileProvider | ||
{ | ||
private Func<int, int, int, Uri> _makeTileUri; | ||
|
||
public NUrlTileLayer(Func<int, int, int, Uri> makeTileUri, int tileSize = 256) : base(tileSize, tileSize) | ||
{ | ||
_makeTileUri = makeTileUri; | ||
} | ||
|
||
public override Java.Net.URL GetTileUrl(int x, int y, int zoom) | ||
{ | ||
var uri = _makeTileUri(x,y,zoom); | ||
return new Java.Net.URL(uri.AbsoluteUri); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.