This library provides the controls/renderers for using Mapbox SDKs inside your Xamarin.Forms app.
This project is maintained by Naxam Co.,Ltd.
We specialize in developing mobile applications using Xamarin and native technology stack.
Looking for developers for your project?
Install-Package Naxam.Mapbox.Forms -pre
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService" />
<local:MapView
x:Name="map"
VerticalOptions="FillAndExpand"
MapStyle="{Binding CurrentMapStyle}"
ZoomLevel="{Binding ZoomLevel}"
/>
map.DidTapOnMapCommand = new Command<Tuple<Position, Point>>((Tuple<Position, Point> obj) =>
{
var features = map.GetFeaturesAroundPoint.Invoke(obj.Item2, 6, null);
var filtered = features.Where((arg) => arg.Attributes != null);
foreach (IFeature feat in filtered) {
var str = JsonConvert.SerializeObject(feat);
System.Diagnostics.Debug.WriteLine(str);
}
});
map.DidFinishLoadingStyleCommand = new Command<MapStyle>((obj) =>
{
map.ResetPositionFunc.Execute(null);
foreach (Layer layer in obj.OriginalLayers)
{
System.Diagnostics.Debug.WriteLine(layer.Id);
}
});
map.ZoomLevel = Device.RuntimePlatform == Device.Android ? 4 : 10;
Detail documentation is coming soon.
Mapbox for Xamarin.Forms is released under the Apache License license. See LICENSE for details.