Skip to content

Commit 5ff4913

Browse files
committed
chore: update readme file, add breaking changes file
1 parent 17ae011 commit 5ff4913

File tree

5 files changed

+103
-35
lines changed

5 files changed

+103
-35
lines changed

BREAKING_CHANGES.md

Whitespace-only changes.

README.md

Lines changed: 70 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,100 @@
11
# Cartography
2+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE)![Version](https://img.shields.io/nuget/v/Cartography.DynamicMap?style=flat-square)![Downloads](https://img.shields.io/nuget/dt/Cartography.DynamicMap?style=flat-square)
23

3-
Nventive solution for mobile app map.
4-
5-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
4+
Cartography provides you 3 map related libraries for iOS, Android and Windows using native map of each platform.
65

76
## Getting Started
87

98
### **Samples**
109
- Clone project a sample is available.
11-
- For seeing samples, build and install app with VS on the desire device (Android, IOS, or UWP)
10+
- For seeing samples, build and install app with VS on the desire device (Android, IOS, or UWP).
11+
12+
### API Key (not needed for mapService)
13+
- For Google Maps (Android), you need to [create your Api Key](https://developers.google.com/maps/documentation/android-sdk/get-api-key).
14+
- For Bing Maps, you need a [Bing Api Key](https://learn.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key) to remove warning.
15+
16+
Set it in : sample.shared => Constants.
17+
18+
```csharp
19+
public class GoogleMaps
20+
{
21+
//TODO: Get new API Key
22+
public const string ApiKey = "";
23+
}
24+
```
25+
26+
### **DynamicMap**
27+
28+
### Permission
29+
- Maps doesn't required to ask permission to the user.
30+
- User Location isn't include in Cartography see: [GeolocatorService](https://github.com/nventive/GeolocatorService).
31+
32+
#### Android
33+
- Setup your permission, in your AssemblyInfo of Android.
34+
35+
```csharp
36+
//Required, replace AppName by your Application Name.
37+
[assembly: UsesPermission("AppName.permission.MAPS_RECEIVE")]
38+
[assembly: Permission(Name = "AppName.permission.MAPS_RECEIVE", ProtectionLevel = Android.Content.PM.Protection.Signature)]
39+
40+
[assembly: UsesPermission("com.google.android.providers.gsf.permission.READ_GSERVICES")]
41+
42+
[assembly: MetaData("com.google.android.maps.v2.API_KEY", Value = Constants.GoogleMaps.ApiKey)]
43+
44+
```
45+
#### UWP
46+
- For windows location is in Package.appxmanifest under capabilities, select Location and Internet(Client).
47+
48+
### Integration
1249

13-
 
14-
## **DynamicMap**
1550
- Add Cartography.DynamicMap NuGet package to your project.
1651
- In your ViewModel :
1752
```csharp
1853
using Cartography.DynamicMap
1954
```
20-
- Implement IDynamicMapComponent to your ViewModel
55+
- Implement IDynamicMapComponent to your ViewModel. [ViewModel sample](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Presentation/DynamicMap_FeaturesPageViewModel.cs)
2156
- Set Initial Value to your ViewPort.
22-
- Add in your Page
57+
- Add in your Page.
58+
59+
[ViewModel sample](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Presentation/DynamicMap_FeaturesPageViewModel.cs)
60+
2361
#### **UWP**
2462
```xml
2563
<win:Grid>
2664
<dynamicMap:MapControl ViewModel="{Binding}" />
2765
</win:Grid>
2866
```
67+
68+
- Add Style MapControl : see [MapControl](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/MapControl.xaml).
69+
2970
#### **Android / IOS**
3071
```xml
3172
<xamarin:Grid>
3273
<dynamicMap:MapControl ViewModel="{Binding}" />
3374
</xamarin:Grid>
3475
```
35-
- Add Style MapControl : see https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/MapControl.xaml
36-
37-
#### **DynamicMap Control**
38-
39-
- Control can be added to your map : See [DynamicMapControl](Documentation/DynamicMapControl.md)
76+
- Control can be added to your map : See [DynamicMap Control Documentation](Documentation/DynamicMapControl.md).
4077

4178
&nbsp;
42-
## **StaticMap**
79+
### **StaticMap**
4380
- Add Cartography.StaticMap NuGet package to your project.
4481
- In your ViewModel :
4582
```csharp
4683
using Cartography.StaticMap
4784
```
48-
- Implement IStaticMapComponent to your ViewModel
85+
- Implement IStaticMapComponent to your ViewModel.
4986
- Set Initial Value to your ViewPort and MapSize.
50-
- Add in your Page
87+
- Add it in your Page.
5188
```xml
5289
<staticmap:StaticMapControl MapViewPort="{Binding ViewPort}"
5390
MapSize="{Binding MapSize}"
5491
Width="10"
5592
Height="10" />
5693
```
57-
- Add Style StaticMapControl : see https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/StaticMapControl.xaml
94+
- Add Style StaticMapControl : see [StaticMapControl](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/StaticMapControl.xaml).
5895
5996
&nbsp;
60-
## **MapService**
97+
### **MapService**
6198
- Add Cartography.MapService NuGet package to your project.
6299
- In your ViewModel :
63100
```csharp
@@ -78,8 +115,8 @@ private IMapService _mapService = this.GetService<IMapService>();
78115
"Montreal"
79116
));
80117
```
81-
OR
82-
for Direction (from user location to a GeoPosition) :
118+
OR
119+
for Direction (from user location to a GeoPosition) :
83120
```csharp
84121
await _mapService.ShowDirections(ct, new MapRequest(
85122
new BasicGeoposition()
@@ -94,10 +131,10 @@ OR
94131
## Features
95132

96133
### DynamicMap
97-
1. `Show Map` : Show a interactive map on screen
98-
- `Google Map` : Show Google Map on screen available for UWP, IOS, Android(native)
99-
- `IOS Map` : Show Apple Map on screen available only on IOS(native)
100-
- `Bing Map` : Show Bing Map on screen available only on UWP(native)
134+
1. `Show Map` : Show a interactive map on screen.
135+
- `Google Map` : Show Google Map on screen available for UWP, iOS, Android(native).
136+
- `IOS Map` : Show Apple Map on screen available only on iOS(native).
137+
- `Bing Map` : Show Bing Map on screen available only on UWP(native).
101138

102139
2. `Show user location` : Show the user location on the map.
103140

@@ -119,33 +156,34 @@ OR
119156
- `Remove Pushpin` : User can remove pushpin.
120157
- `Stop animation` : User can stop animation to somewhere.
121158
- `Zoom on user` : Center the map to user location.
122-
- `Show POI` : IOS only: show Point Of Interest. eg: Tour Eiffel.
159+
- `Show POI` : iOS only: show Point Of Interest. ex: Tour Eiffel.
123160

124161
5. `Follow User`
125162
- `Start follow user`
126163
- `Stop follow user` : Can detect if dragging or on button press.
127164

128165
### StaticMap
129166
1. `Show Map`: Show a map on screen without interraction possible.
130-
- `Google Map` : Show Google Map on screen available for UWP, IOS, Android(native)
131-
- `IOS Map` : Show Apple Map on screen available only on IOS(native)
132-
- `Bing Map` : Show Bing Map on screen available only on UWP(native)
133-
2. `Show Pushpin` : Show one pushpin on map (if place in bound)
167+
- `Google Map` : Show Google Maps on screen available for UWP, iOS, Android(native).
168+
- `iOS Map` : Show Apple Maps on screen available only on iOS(native).
169+
- `Bing Map` : Show Bing Maps on screen available only on UWP(native).
170+
2. `Show Pushpin` : Show one pushpin on map (if place in bound).
134171

135172
### MapService
136173
1. `Location` : Open user default map service and show a location.
137174
2. `Direction` : Open user default map service and show direction from User location to somewhere.
138175

139176

140-
## Changelog
177+
## Breaking Changes
178+
179+
Please consult the [BREAKING CHANGES](BREAKING_CHANGES.md) for the list of breaking changes.
141180

142181
Please consult the [CHANGELOG](CHANGELOG.md) for more information about version
143182
history.
144183

145184
## License
146185

147-
This project is licensed under the Apache 2.0 license - see the
148-
[LICENSE](LICENSE) file for details.
186+
This project is licensed under the [Apache 2.0 license](LICENSE).
149187

150188
## Contributing
151189

src/Cartography/Cartography.DynamicMap/Cartography.DynamicMap.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
<Company>nventive</Company>
1212
<AssemblyName>Cartography.DynamicMap</AssemblyName>
1313
<PackageId>Cartography.DynamicMap</PackageId>
14-
<Description>Cartography.DynamicMap</Description>
14+
<Description>Provide an interactive map for iOS, Android and UWP.</Description>
15+
<PackageTags>cartography;dynamicmap;mvvm;ios;android;xamarin;uwp;google maps;bing maps;uno;maps</PackageTags>
1516
<GenerateDocumentationFile>true</GenerateDocumentationFile>
17+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1618
<PackageProjectUrl>https://github.com/nventive/Cartography</PackageProjectUrl>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1720

1821
<!--Needed for Source Link support -->
1922
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -54,6 +57,13 @@
5457
</None>
5558
</ItemGroup>
5659

60+
<ItemGroup>
61+
<None Include="..\..\..\README.md">
62+
<Pack>True</Pack>
63+
<PackagePath>\</PackagePath>
64+
</None>
65+
</ItemGroup>
66+
5767
<ItemGroup Condition="'$(TargetFramework)' == 'monoandroid12.0'">
5868
<PackageReference Include="Xamarin.GooglePlayServices.Base">
5969
<Version>117.6.0.5</Version>

src/Cartography/Cartography.MapService/Cartography.MapService.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
<Company>nventive</Company>
1212
<AssemblyName>Cartography.MapService</AssemblyName>
1313
<PackageId>Cartography.MapService</PackageId>
14-
<Description>Cartography.MapService</Description>
14+
<Description>Open default map service of the platform.</Description>
15+
<PackageTags>cartography;mapService;mvvm;ios;android;xamarin;uwp;google maps;bing maps;uno;maps</PackageTags>
1516
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1617
<PackageProjectUrl>https://github.com/nventive/Cartography</PackageProjectUrl>
18+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1720

1821
<!--Needed for Source Link support -->
1922
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -34,4 +37,11 @@
3437
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
3538
</ItemGroup>
3639

40+
<ItemGroup>
41+
<None Include="..\..\..\README.md">
42+
<Pack>True</Pack>
43+
<PackagePath>\</PackagePath>
44+
</None>
45+
</ItemGroup>
46+
3747
</Project>

src/Cartography/Cartography.StaticMap/Cartography.StaticMap.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
<Company>nventive</Company>
1212
<AssemblyName>Cartography.StaticMap</AssemblyName>
1313
<PackageId>Cartography.StaticMap</PackageId>
14-
<Description>Cartography.StaticMap</Description>
14+
<Description>Provide a static map for iOS, Android and UWP.</Description>
15+
<PackageTags>cartography;staticmap;mvvm;ios;android;xamarin;uwp;google maps;bing maps;uno;maps</PackageTags>
1516
<GenerateDocumentationFile>true</GenerateDocumentationFile>
17+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1618
<PackageProjectUrl>https://github.com/nventive/Cartography</PackageProjectUrl>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1720

1821
<!--Needed for Source Link support -->
1922
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -34,6 +37,13 @@
3437
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
3538
</ItemGroup>
3639

40+
<ItemGroup>
41+
<None Include="..\..\..\README.md">
42+
<Pack>True</Pack>
43+
<PackagePath>\</PackagePath>
44+
</None>
45+
</ItemGroup>
46+
3747
<ItemGroup Condition="'$(TargetFramework)' == 'xamarinios10'">
3848
<PackageReference Include="Uno.Extensions.Logging.OSLog">
3949
<Version>1.4.0</Version>

0 commit comments

Comments
 (0)