A powerful open-source library based on Sygic Maps SDK which can be used to display rich map content and interact with it. (if you are looking for a iOS version, you can find it here)
To get familiar with all the features available, you can first try out our Sample App.
-
Request the Sygic API key. To start developing with Sygic Maps SDK, please fill this form and get your API key.
-
Specify these Gradle properties:
android { ... dataBinding { enabled = true } compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } }
-
Min API 21 (Android 5.0 Lollipop)
-
Some Views and Modules requires global theme attributes to be specified. Don't forget to define them or use/extend our predefined theme! (otherwise, application crashes :( )
-
Gradle project file:
allprojects { repositories { google() jcenter() maven { url "https://public.repo.sygic.com/repository/maven-sygic-releases/" } } }
-
Gradle module file:
dependencies { ... // Pattern: implementation 'sygic-prefix:module-name:version' implementation 'com.sygic.maps:module-browsemap:1.2.0' implementation 'com.sygic.maps:module-search:1.4.0' implementation 'com.sygic.maps:module-navigation:1.5.0' ... }
all available modules can be found on the release page.
-
Finally, you need to add your API key to the Android Manifest:
<manifest package="com.sygic.samples"> <application> ... <meta-data android:name="@string/com_sygic_api_key" android:value="place your API key here" /> </application> </manifest>
-
Optional, but recommended. Configure APK split to reduce final application size:
import com.android.build.OutputFile ... android { ... defaultConfig { ... versionCode 1 } def abiCodes = ['armeabi-v7a':2, 'arm64-v8a':3, 'x86':8, 'x86_64':9 ] android.applicationVariants.all { variant -> variant.outputs.each { output -> def abiName = output.getFilter(OutputFile.ABI) output.versionCodeOverride = abiCodes.get(abiName, 0) * 100000 + variant.versionCode } } splits { abi { enable true reset() include "armeabi-v7a", "arm64-v8a", "x86", "x86_64" universalApk false } } } ...
for more info visit this page.
Simply put the BrowseMapFragment to your layout container:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/browseMapFragment"
class="com.sygic.maps.module.browsemap.BrowseMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
for more usage examples go to the Wiki page.
First read the Wiki page, then try to search on Stackoverflow or visit the GitHub issues page.
- Miroslav Kacera - Primary contributor & Team Leader - bio007
- Tomáš Valenta - Primary contributor - YAV
This project is licensed under the MIT License
Copyright (c) 2019 Sygic a.s.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.