woosmap-sdk

Woosmap Android SDK purpose is to offer a full toolkit to ease the integration of Woosmap' services on an Android application. It provides a MapView that you can use to represent any geographical data. You can enrich this MapView with our renderers for various streamlined use-cases. It also contains a full client library to simplify querying our web services.

Configure Gradle to install our SDK

The path to our maven's repository is https://native-sdk.woosmap.com/android/ In settings.gradle.kts file add the path to our maven's repository like this

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url = uri("https://native-sdk.woosmap.com/android/")
}
}
}

Then you can add the dependency to our SDK in your gradle's build.gradle.kts module-level file

dependencies {
//...
implementation("com.woosmap:sdk:1.2.3")
//...
}

How to use

In order to authenticate your application you will need to add a meta-data information to specify your private key in the AndroidManifest.xml in your application's tag like so:

<application>
<!-- ... -->
<meta-data android:name="com.woosmap.sdk.privateKey" android:value="YOUR PRIVATE KEY HERE" />
</application>

Once done if you wish to use directly any of the API clients classes you'll need to make sure you have the library initialized before hand in your code (a single call in the MainActivity is enough)

Woosmap.initialize(applicationContext)

Changelog

v1.2.3

  • Marker enhancements:

    • Added alpha, rotation, zIndex, flat, tag and contentDescription properties on Marker.

    • Promoted Marker.id to public API as a stable, opaque identifier.

    • Added Marker.remove() and Marker.isRemoved. remove() is idempotent, detaches the marker from its renderer, clears listeners, and locks further property writes (subsequent setters silently no-op).

    • A Marker can now only be attached to a single MarkersRenderer at a time; re-adding a removed or already-attached marker throws IllegalStateException.

    • MarkersRenderer now honors Icon.anchor (pixel offset from the icon's top-left, default bottom-center).

  • Added gesture toggles on MapView.uiSettings: isTiltGesturesEnabled, isRotateGesturesEnabled, isZoomGesturesEnabled, isScrollGesturesEnabled (all default true).

v1.2.2

  • Added LocalitiesTypesUnknown sealed class (subtypes Localities, Poi, PoiAlias, Unspecified) implementing LocalitiesTypes. The polymorphic LocalitiesTypesAdapter now returns LocalitiesTypesUnknown.Unspecified(rawValue) for any server-emitted type the SDK does not yet model — autocomplete and details responses no longer throw JsonParseException on unmodeled values. The raw wire string is preserved on the sentinel and accessible via .value / .toString().

  • Verified via tests that LocalitiesService.localitiesNearby and LocalitiesService.localitiesGeocodeAddress / localitiesGeocodeLatLng do not crash when the server publishes unmodeled values in types or categories; Gson continues to silently drop those entries until the next major release widens the field types.

  • Deprecated, slated for change in the next major release:

    • LocalitiesGeocodeTypes enum (will be removed; wire values overlap exactly with LocalitiesTypesEnum, migrate comparisons 1:1).

    • LocalitiesNearbyResult.types and LocalitiesNearbyResult.categories (element type will widen from LocalitiesTypesPOI to LocalitiesTypes).

    • LocalitiesGeocodeResponse.types (element type will widen from LocalitiesGeocodeTypes to LocalitiesTypes).

v1.2.1

  • Added new AdminLevel1, AdminLevel2 and AdminLevel3 in LocalitiesTypesEnum

v1.2.0

  • Added hybrid map support - Now MapView's map type be set between MapType.ROADMAP and MapType.HYBRID

v1.1.8

  • Added session ids to Localities autocomplete and details endpoint.

  • Added nearby method in LocalitiesService.

  • Added tolls method in DistanceService.

  • Added excluded_types param in localitiesAutocomplete method.

  • Added excluded_types param in geocode method.

  • Added new TransitServices class with transit route method.

v1.1.7

  • Bug fix - StoresService search did not work when address line is a string.

v1.1.6

  • Fix special opening hours type for StoresService

v1.1.5

  • Bump AGP to 8.11.0

  • Enforce usage of NDK r27

  • Build with support for 16kb page size

v1.1.4

  • Upgraded all dependencies

v1.1.3

  • Add support for IndoorOfflineVenue

  • Bump AGP to 8.5.0

  • Bump Kotlin to 2.0.0

v1.1.2

  • Add styling options for DistanceRenderer

  • Add callback for the selected route of DistanceRenderer

v1.1.1

  • Add stylersJson properties to support custom styles for a map

  • Add callbacks on MapView when style is loaded, map is loaded or if it fails to do so

  • Add missing documentation for size and minSize parameters of DefaultStyleRule

v1.1.0

  • Change StoresService to support autocomplete, search and bounds

  • Update StoresAutocompleteTextView to use the correct autocomplete API

  • Allow StoresRenderer.select to take null in order to unselect

  • Bump AGP to 8.2.2

  • Bump dependencies versions

  • Use C++17

v1.0.2

  • Change proguard.rules to avoid potential conflict with other dependencies

  • Upgrade AGP to 8.2.1

  • Upgrade to Kotlin and its plugins to 1.9.20

  • Update copyright notice

v1.0.1

  • Added support for the new default icons for IndoorRenderer

  • Added support for the new list_sub_buildings parameters of LocalitiesService

Packages

Link copied to clipboard

Main package containing the configuration singleton and UI components.

Link copied to clipboard

Contains service classes to use various Woosmap APIs.

Link copied to clipboard

Contains models data classes for Distance API.

Link copied to clipboard

Contains models data classes for Indoor API.

Link copied to clipboard

Contains models data classes for Localities API.

Link copied to clipboard

Contains shared models data classes for several APIs.

Link copied to clipboard

Contains models data classes for Stores API.

Link copied to clipboard
Link copied to clipboard

Classes to serialize and deserialize GeoJSON data.

Link copied to clipboard

Contains geometry related classes

Link copied to clipboard

Contains helpers to manage location permissions.

Link copied to clipboard

Classes that can be used with the MapView.

Link copied to clipboard

Camera related classes to be used with a MapView.

Link copied to clipboard

Renderers classes used to draw on a MapView.