-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update readme file, add breaking changes file #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,100 @@ | ||
| # Cartography | ||
| [](LICENSE) | ||
|
|
||
| Nventive solution for mobile app map. | ||
|
|
||
| [](LICENSE) | ||
| Cartography provides you 3 map related libraries for iOS, Android and Windows using native map of each platform. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### **Samples** | ||
| - Clone project a sample is available. | ||
| - For seeing samples, build and install app with VS on the desire device (Android, IOS, or UWP) | ||
| - For seeing samples, build and install app with VS on the desire device (Android, IOS, or UWP). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checking the samples should not be steps of the Getting Started section. |
||
|
|
||
| ### API Key (not needed for mapService) | ||
| - For Google Maps (Android), you need to [create your Api Key](https://developers.google.com/maps/documentation/android-sdk/get-api-key). | ||
| - 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. | ||
|
|
||
| Set it in : sample.shared => Constants. | ||
|
|
||
| ```csharp | ||
| public class GoogleMaps | ||
| { | ||
| //TODO: Get new API Key | ||
| public const string ApiKey = ""; | ||
| } | ||
| ``` | ||
|
|
||
| ### **DynamicMap** | ||
|
|
||
| ### Permission | ||
| - Maps doesn't required to ask permission to the user. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Permissions for what? Why are we mentioning this in the Getting Started section if it's not even needed? It's also a bit confusing because the next nested section is about setting up permissions on Android, which seem to be required. |
||
| - User Location isn't include in Cartography see: [GeolocatorService](https://github.com/nventive/GeolocatorService). | ||
|
|
||
| #### Android | ||
| - Setup your permission, in your AssemblyInfo of Android. | ||
|
|
||
| ```csharp | ||
| //Required, replace AppName by your Application Name. | ||
| [assembly: UsesPermission("AppName.permission.MAPS_RECEIVE")] | ||
| [assembly: Permission(Name = "AppName.permission.MAPS_RECEIVE", ProtectionLevel = Android.Content.PM.Protection.Signature)] | ||
|
|
||
| [assembly: UsesPermission("com.google.android.providers.gsf.permission.READ_GSERVICES")] | ||
|
|
||
| [assembly: MetaData("com.google.android.maps.v2.API_KEY", Value = Constants.GoogleMaps.ApiKey)] | ||
|
|
||
| ``` | ||
| #### UWP | ||
| - For windows location is in Package.appxmanifest under capabilities, select Location and Internet(Client). | ||
|
|
||
| ### Instantiation | ||
|
|
||
| | ||
| ## **DynamicMap** | ||
| - Add Cartography.DynamicMap NuGet package to your project. | ||
| - In your ViewModel : | ||
| ```csharp | ||
| using Cartography.DynamicMap | ||
| ``` | ||
| - Implement IDynamicMapComponent to your ViewModel | ||
| - Implement IDynamicMapComponent to your ViewModel. [ViewModel sample](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Presentation/DynamicMap_FeaturesPageViewModel.cs) | ||
| - Set Initial Value to your ViewPort. | ||
| - Add in your Page | ||
| - Add in your Page. | ||
|
|
||
| [ViewModel sample](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Presentation/DynamicMap_FeaturesPageViewModel.cs) | ||
|
|
||
| #### **UWP** | ||
| ```xml | ||
| <win:Grid> | ||
| <dynamicMap:MapControl ViewModel="{Binding}" /> | ||
| </win:Grid> | ||
| ``` | ||
|
|
||
| - Add Style MapControl : see [MapControl](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/MapControl.xaml). | ||
|
|
||
| #### **Android / IOS** | ||
| ```xml | ||
| <xamarin:Grid> | ||
| <dynamicMap:MapControl ViewModel="{Binding}" /> | ||
| </xamarin:Grid> | ||
| ``` | ||
| - Add Style MapControl : see https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/MapControl.xaml | ||
|
|
||
| #### **DynamicMap Control** | ||
|
|
||
| - Control can be added to your map : See [DynamicMapControl](Documentation/DynamicMapControl.md) | ||
| - Control can be added to your map : See [DynamicMap Control Documentation](Documentation/DynamicMapControl.md). | ||
|
|
||
| | ||
| ## **StaticMap** | ||
| ### **StaticMap** | ||
| - Add Cartography.StaticMap NuGet package to your project. | ||
| - In your ViewModel : | ||
| ```csharp | ||
| using Cartography.StaticMap | ||
| ``` | ||
| - Implement IStaticMapComponent to your ViewModel | ||
| - Implement IStaticMapComponent to your ViewModel. | ||
| - Set Initial Value to your ViewPort and MapSize. | ||
| - Add in your Page | ||
| - Add it in your Page. | ||
| ```xml | ||
| <staticmap:StaticMapControl MapViewPort="{Binding ViewPort}" | ||
| MapSize="{Binding MapSize}" | ||
| Width="10" | ||
| Height="10" /> | ||
| ``` | ||
| - Add Style StaticMapControl : see https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/StaticMapControl.xaml | ||
| - Add Style StaticMapControl : see [StaticMapControl](https://github.com/nventive/Cartography/blob/master/Samples/Samples/Samples.Shared/Views/Styles/StaticMapControl.xaml). | ||
|
|
||
| | ||
| ## **MapService** | ||
| ### **MapService** | ||
| - Add Cartography.MapService NuGet package to your project. | ||
| - In your ViewModel : | ||
| ```csharp | ||
|
|
@@ -78,8 +115,8 @@ private IMapService _mapService = this.GetService<IMapService>(); | |
| "Montreal" | ||
| )); | ||
| ``` | ||
| OR | ||
| for Direction (from user location to a GeoPosition) : | ||
| OR | ||
| for Direction (from user location to a GeoPosition) : | ||
| ```csharp | ||
| await _mapService.ShowDirections(ct, new MapRequest( | ||
| new BasicGeoposition() | ||
|
|
@@ -94,10 +131,10 @@ OR | |
| ## Features | ||
|
|
||
| ### DynamicMap | ||
| 1. `Show Map` : Show a interactive map on screen | ||
| - `Google Map` : Show Google Map on screen available for UWP, IOS, Android(native) | ||
| - `IOS Map` : Show Apple Map on screen available only on IOS(native) | ||
| - `Bing Map` : Show Bing Map on screen available only on UWP(native) | ||
| 1. `Show Map` : Show a interactive map on screen. | ||
| - `Google Map` : Show Google Map on screen available for UWP, iOS, Android(native). | ||
| - `IOS Map` : Show Apple Map on screen available only on iOS(native). | ||
| - `Bing Map` : Show Bing Map on screen available only on UWP(native). | ||
|
|
||
| 2. `Show user location` : Show the user location on the map. | ||
|
|
||
|
|
@@ -119,33 +156,34 @@ OR | |
| - `Remove Pushpin` : User can remove pushpin. | ||
| - `Stop animation` : User can stop animation to somewhere. | ||
| - `Zoom on user` : Center the map to user location. | ||
| - `Show POI` : IOS only: show Point Of Interest. eg: Tour Eiffel. | ||
| - `Show POI` : iOS only: show Point Of Interest. ex: Tour Eiffel. | ||
|
|
||
| 5. `Follow User` | ||
| - `Start follow user` | ||
| - `Stop follow user` : Can detect if dragging or on button press. | ||
|
|
||
| ### StaticMap | ||
| 1. `Show Map`: Show a map on screen without interraction possible. | ||
| - `Google Map` : Show Google Map on screen available for UWP, IOS, Android(native) | ||
| - `IOS Map` : Show Apple Map on screen available only on IOS(native) | ||
| - `Bing Map` : Show Bing Map on screen available only on UWP(native) | ||
| 2. `Show Pushpin` : Show one pushpin on map (if place in bound) | ||
| - `Google Map` : Show Google Maps on screen available for UWP, iOS, Android(native). | ||
| - `iOS Map` : Show Apple Maps on screen available only on iOS(native). | ||
| - `Bing Map` : Show Bing Maps on screen available only on UWP(native). | ||
| 2. `Show Pushpin` : Show one pushpin on map (if place in bound). | ||
|
|
||
| ### MapService | ||
| 1. `Location` : Open user default map service and show a location. | ||
| 2. `Direction` : Open user default map service and show direction from User location to somewhere. | ||
|
|
||
|
|
||
| ## Changelog | ||
| ## Breaking Changes | ||
|
|
||
| Please consult the [BREAKING CHANGES](BREAKING_CHANGES.md) for the list of breaking changes. | ||
|
|
||
| Please consult the [CHANGELOG](CHANGELOG.md) for more information about version | ||
| history. | ||
|
|
||
| ## License | ||
|
|
||
| This project is licensed under the Apache 2.0 license - see the | ||
| [LICENSE](LICENSE) file for details. | ||
| This project is licensed under the [Apache 2.0 license](LICENSE). | ||
|
|
||
| ## Contributing | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS, not IOS