MapwizeSDK on Android

The Mapwize Android SDK allows you to add indoor maps and wayfinding in your iOS apps. After your map has been created in Mapwize Studio, you can use this SDK to display the map in your app and let the user interact with it.

This SDK only comes with the core MapView and API and is intended for the advanced Mapwize integrations. For a first integration of Mapwize in your project, please consider Mapwize UI.

Open-source Mapwize UI

If you are looking for a fully featured and ready to use Fragment to add Mapwize Indoor Maps and Navigation in your Android app, have a look at Mapwize UI. This open-source project enriches the core SDK with interfaces for search and directions, that you can use as is or modify to your taste.

We are ourselves using Mapwize UI to build the Mapwize app available on Google Play store.

Compatibility

MapwizeSDK is compatible with Android api 21 and above.

Adding Mapwize to your project

In your main gradle app, add the following maven repositories

repositories {
    repositories {
        ...
        maven { url "https://jitpack.io" }
        maven { url "https://maven.mapwize.io"}
    }
}

In the gradle file of your application, add the Mapwize dependency.

dependencies {
  implementation ("io.mapwize.sdk:mapwize-sdk:{lib-version}") {
      transitive = true
  }
}

As mapbox is now compatible with java 8, you have to add those lines to the build.gradle in number to avoid error at start.

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Mapwize API Key

You'll need a Mapwize API key to load the plugin and allow API requests. To get your own Mapwize API key, sign up for a free account at mapwize.io. Then within the Mapwize Studio, navigate to "API Keys" on the side menu.

In your main Application class, initialize the MapwizeConfiguration in the onCreate method.

public class MyApplication  extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        MapwizeConfiguration.start(this, "YOUR_API_KEY");
    }
}

Your main Application class needs to be defined in your Manifest.xml

<application
        ...
        android:name=".MyApplication">
        ...
</application>

Mapwize demo keys are available for testing in the demo projects. Please note they cannot be used in production.

Changing api key at runtime

In some cases, you may want to display a map using a different API key than the one used at initialization. For example, you displayed a first map for an organization A and you want to display another map for an organization B.

In that cases, you must use the MapwizeConfiguration#Builder that returns a MapwizeConfiguration object. Once you have your MapwizeConfiguration, you can use it in every Mapwize class that need this object.

Note : If you want to inflate MapwizeView from xml file, you have to use the MapwizeConfiguration singleton.

Configuring the outdoor map

MapwizePlugin is using Mapbox for the outdoor map. There are 2 options regarding the outdoor:

Adding your first map

You can instantiate MapwizeView using the layout.xml or programmatically.

Inflating from XML

activity_create_map_using_xml.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".CreateMapUsingXmlActivity">

    <io.mapwize.mapwizeformapbox.map.MapwizeView
        android:id="@+id/mapwizeView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

MapwizeApplication.java

public class MapwizeApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
    // Mapbox initialization requirement
    Mapbox.getInstance(this, "pk.mapwize");
    // Mapwize globale initialization
    MapwizeConfiguration.start(this,
            "YOUR_API_KEY");
  }
}

CreateMapUsingXmlActivity.java

public class CreateMapUsingXmlActivity extends AppCompatActivity {

  MapwizeView mapwizeView;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_create_map_using_xml);
    mapwizeView = findViewById(R.id.mapwizeView);
    mapwizeView.onCreate(savedInstanceState);
    mapwizeView.getMapAsync((mapwizeMap) -> {
      // Mapwize is fully loaded.
    });
  }

  @Override
  public void onStart() {
    super.onStart();
    mapwizeView.onStart();
  }

  @Override
  public void onResume() {
    super.onResume();
    mapwizeView.onResume();
  }

  @Override
  public void onPause() {
    mapwizeView.onPause();
    super.onPause();
  }

  @Override
  public void onStop() {
    mapwizeView.onStop();
    super.onStop();
  }

  @Override
  public void onSaveInstanceState(@NonNull Bundle saveInstanceState) {
    super.onSaveInstanceState(saveInstanceState);
    mapwizeView.onSaveInstanceState(saveInstanceState);
  }

  @Override
  public void onLowMemory() {
    super.onLowMemory();
    mapwizeView.onLowMemory();
  }

  @Override
  public void onDestroy() {
    mapwizeView.onDestroy();
    super.onDestroy();
  }
}

Instanciate programmatically

activity_create_map_programmatically.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".CreateMapProgrammaticallyActivity">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

MapwizeApplication.java

public class MapwizeApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
    // Mapbox initialization requirement
    Mapbox.getInstance(this, "pk.mapwize");
    // Mapwize globale initialization
    MapwizeConfiguration.start(this,
            "YOUR_API_KEY");
  }
}

CreateMapProgrammaticallyActivity.java

public class CreateMapProgrammaticallyActivity extends AppCompatActivity {

  MapwizeView mapwizeView;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_create_map_programmatically);

    FrameLayout container = findViewById(R.id.container);

    MapwizeMapOptions options = new MapwizeMapOptions.Builder()
            .build();
    mapwizeView = new MapwizeView(getApplicationContext(), options);
    mapwizeView.setLayoutParams(new FrameLayout.LayoutParams(
            FrameLayout.LayoutParams.MATCH_PARENT,
            FrameLayout.LayoutParams.MATCH_PARENT
    ));
    container.addView(mapwizeView);
    mapwizeView.onCreate(savedInstanceState);
    mapwizeView.getMapAsync((mapwizeMap) -> {
      // Mapbox and Mapwize are fully loaded.
    });
  }

  @Override
  public void onStart() {
    super.onStart();
    mapwizeView.onStart();
  }

  @Override
  public void onResume() {
    super.onResume();
    mapwizeView.onResume();
  }

  @Override
  public void onPause() {
    mapwizeView.onPause();
    super.onPause();
  }

  @Override
  public void onStop() {
    mapwizeView.onStop();
    super.onStop();
  }

  @Override
  public void onSaveInstanceState(@NonNull Bundle saveInstanceState) {
    super.onSaveInstanceState(saveInstanceState);
    mapwizeView.onSaveInstanceState(saveInstanceState);
  }

  @Override
  public void onLowMemory() {
    super.onLowMemory();
    mapwizeView.onLowMemory();
  }

  @Override
  public void onDestroy() {
    mapwizeView.onDestroy();
    super.onDestroy();
  }
}

MapActivity

As the loading of the map can take some time, especially when large venues need to be loaded, it is advised to keep the map active in the activity in case of rotation and resize, instead of detroying and recreating it. To do so, the attribute android:configChanges="orientation|sreenSize" can be added to the activity.

<activity
    android:name=".MapActivity"
    android:configChanges="orientation|screenSize">
    ...
</activity>

Mapwize plugin options

The plugin can be loaded with the following options available in the MapwizeMapOptions class:

All options can be used in your layout.xml file.

It is also possible to specify a main color to tint all the controls on the map. To do so, add mapwize_main_color in value/colors in your app.

Listeners

Listeners are provided for all kind of events, from click to venueEntre and FloorChange. Check the javadoc for details.

Click event

In number to react to click events on the map, Mapwize provides an object that helps you know on which object the user clicked. It can be a venue, a place or nothing.

It is represented with 3 event types :

public final static int MAP_CLICK = 0;  // The user clicked on the map
public final static int PLACE_CLICK = 1;// The user clicked on a place
public final static int VENUE_CLICK = 2;// The user clicked on a venue

The following attributes can be retrieved :

int eventType;              // Enum, see above
LatLngFloor latLngFloor;    // The latLngFloor at which the click was made. The latitude and longitudes are always set, but the floor can be null. Available for all event types.
PlacePreview placePreview;                // Not null if eventType == PLACE_CLICK
VenuePreview venuePreview;                // Not null if eventType == VENUE_CLICK

A typical way to handle those event :]

mapwizePlugin.setOnClickListener(event -> {
    switch (event.getEventType()) {
        case ClickEvent.MAP_CLICK:
            LatLngFloor llf = event.getLatLngFloor()
            // Do something with LatLngFloor
            break;
        case ClickEvent.PLACE_CLICK:
            PlacePreview placePreview = event.getPlacePreview()
            // Do something with place
            break;
        case ClickEvent.VENUE_CLICK:
            VenuePreview venuePreview = event.getVenuePreview())
            // Do something with venue
            break;
        }
});

Indoor Location

Displaying the user's location on the map is done by connecting an IndoorLocationProvider to Mapwize.

There are a lot of IndoorLocation providers already freely available as part of the IndoorLocation open-source framework.

If you are missing your provider, contact us at support@mapwize.io or build your own starting from the base classes.

To set the IndoorLocationProvider on the MapwizePlugin:

public void setIndoorLocationProvider(@NonNull IndoorLocationProvider provider);
public void setIndoorLocationProvider(@NonNull IndoorLocationProvider provider, LocationComponentOptions userOnfloorOptions, LocationComponentOptions userOutOfFloorOptions, boolean showUserHeading);

To learn more about the LocationComponentOptions see Mabpox user location customization
Our default values are :

onFloorLocationComponentOptions = LocationComponentOptions.builder(mapView.getContext())
.elevation(5)
.accuracyAlpha(.0f)                                     // Hide the accuracy
.accuracyColor(Color.parseColor(mainColor))             // Use the main color (useless cause alpha = 0)
.foregroundTintColor(Color.parseColor(mainColor))       // Use the main color for the forground
.bearingTintColor(Color.parseColor(mainColor))          // Use the main color for the heading
.foregroundStaleTintColor(Color.parseColor(mainColor))  // Use the main color if the user location does not change for a while
.trackingGesturesManagement(true)                       // Allow the override of touch event action
.trackingAnimationDurationMultiplier(0.5f)              // Change the animation duration when location change
.trackingInitialMoveThreshold(100)                      // Allow the user to touch the screen without removing the follow user mode
.trackingMultiFingerMoveThreshold(100)                  // Allow the user to multiple gesture without remove the follow user mode
.build();

outOfFloorLocationComponentOptions = LocationComponentOptions.builder(mapView.getContext())
.elevation(5)
.accuracyAlpha(.3f)
.accuracyColor(Color.GRAY)
.foregroundTintColor(Color.GRAY)
.bearingTintColor(Color.GRAY)
.foregroundStaleTintColor(Color.GRAY)
.trackingAnimationDurationMultiplier(0.5f)
.trackingInitialMoveThreshold(100)
.trackingMultiFingerMoveThreshold(100)
.build();

If you want to manually set the user location, you can use the ManualIndoorLocationProvider

You can retrieve the current user position on the map using IndoorLocation getUserPosition() and the user heading using Double getUserHeading()`

There is no listener to be notified of any new user location. Subscribe to the IndoorLocationProvider's listener instead.

The user's heading is also displayed on the map as an arrow from the user position. The heading is retrieved directly from the device. It is not possible to manually set the user heading at this point.

FollowUserMode

You can use the follow user mode feature to automatically move the map as the user location changes.

3 modes are provided by FollowUserMode enum class :

You can retrieve the current mode using the FollowUserMode getFollowUserMode() method and you can set it using

public void setFollowUserMode(FollowUserMode followMode)

The FollowUserMode is automatically set to NONE when the user manually moves the map or changes floor.

Venues

Indoor maps are defined inside venues. The map will automatically enter in a venue when the zoom is sufficient, and exit the venue when the map is moved away. Only one venue can be open at a time.

The currently displayed venue can be retrieved using the getVenue method

public Venue getVenue();

The method returns null if no venue is displayed on the map. Listeners are available to listen to enter and exit of venues.

Universes

Venues can have multiple universes. Universes are like views. In Mapwize Studio, it is possible to define which elements are displayed in each universe and define security policies for each of them.

When a venue is displayed, the method Universe getUniverse() will return the currently displayed universe for that venue.

You can set and get the universe for each venue using

public void setUniverse(@NonNull Universe universe);
public void setUniverseForVenue(@NonNull Universe universe, @NonNull Venue venue);
public Universe getUniverseForVenue(@NonNull Venue venue);

Floors

Venues usually have multiple floors. Floors are identified by a Double and can be decimal.

When a venue is displayed, the method Double getFloor() will return the currently displayed floor for that venue and List<Double> getFloors() will return the list of active floors for that venue. A floor is considered active if the geometry of one layer of that floor is intersecting with the visible region on the screen.

You can change floor using

public void setFloorForVenue(@NonNull Double floor, @NonNull Venue venue);
public void setFloor(Double floor);

The OnFloorWillChange event is fired when the SDK starts loading floor content.
The OnFloorChange event is fired when the floor data are loaded.
The OnFloorsChange event is fired when the list of active floors changes, which may or may not happen at venue enter, venue exit or universe change.

Languages

The title of the places that are displayed on the map can be translated in multiple languages and you can control what language is used.

Firstly, you can set the preferered language of the user. By default, titles will be displayed in the preferred language if available in the venue. Otherwise, the main language of the venue is used.

public void setPreferredLanguage(@NonNull String language);
public String getPreferredLanguage();

It is also possible to specify what language to use for a specific venue and get the language displayed for the current venue.

public void setLanguageForVenue(@NonNull String language, @NonNull Venue venue);
public String getLanguage();

Adding markers

Markers is a convenient way to add simple pins on the map.

Mapwize Markers are positioned on a specific floor and therefore only displayed if that floor is selected. However, they are not attached to a specific venue and will be displayed even if the venue is not visible.

If you want to add more complex annotations on the map, you have all the power of Mapbox at your disposal. Have a look at their documentation

By default, the image used for the pin is the standard Mapwize pin. However, you can specify your own using a Mapbox Icon.

Marker addMarker(@NonNull LatLngFloor latLngFloor);
Marker addMarker(@NonNull LatLngFloor latLngFloor, @NonNull String markerIconName);
Marker addMarker(@NonNull Place place);
Marker addMarker(@NonNull Place place, @NonNull String markerIconName);
void addMarkers(@NonNull Placelist placelist, @NonNull OnMarkersAdded callback);
void addMarker(@NonNull Placelist placelist, @NonNull String markerIconName, @NonNull OnMarkersAdded callback);
void removeMarker(@NonNull Marker markerCoordinate);

interface OnMarkersAdded<T> {
    void getMarkersAsync(T markers);
}

Promoting places

The title of places are displayed based on the zoom level. The objective is to display as many as possible without having collisions. By default, the number specified in Mapwize Studio is used to define which place is displayed first.

However, there are situations where you would like to change dynamically the number. For example, if the user clicks on a place and you display informations about it, you might want to make sure that the title of that place is displayed. Basically, you want to promote that place to the first position.

Promoting places make them come first on the rendering. Of course, the collision mechanism still apply so if 2 promoted places collide, then only the first in the promotion list comes first. Also, promoted places only show on their floor when their venue are visible.

void addPromotedPlace(@NonNull Place place);
void addPromotedPlaces(@NonNull List<Place> places);
void addPromotedPlaces(@NonNull Placelist placelist, @NonNull OnPlacesPromoted callback);
void removePromotedPlace(@NonNull Place place);
void removePromotedPlaces(@NonNull List<Place> places);
void removePromotedPlaces(@NonNull Placelist placelist);
void removePromotedPlaces();

interface OnPlacesPromoted {
    void getPlacesAsync(@NonNull List<Place> places);
}

Showing Direction

To display directions on the map, the first step is to compute them. For that, you'll need to use the API methods to get a Direction object as described in the API section.

When you have a Direction object, you can display it on the map using

public void setDirection(@NonNull Direction direction);
public void setDirection(@NonNull Direction direction, @NonNull DirectionOptions options);

The first method will use defaut DirectionOptions.

Here is the list of options with their default value:

String startMarkerIconName = null;
String endMarkerIconName = "mapwize_default_marker_icon";
boolean displayStartMarker = false;
boolean displayEndMarker = true;
boolean centerOnStart = true;
boolean displayStartingFloor = true;

You can retrieve the displayed direction using

public Direction getDirection();

And you can remove the direction by setting it to null or use
java
public void removeDirection();

Showing Navigation (Dynamic direction)

Navigation is used to display a direction between the user location to his destination.

In number to provide an understandable visualization, Mapwize recompute the IndoorLocation to put the user position dot at the most realistic position on the direction path. Below, you will read how to use this information to recompute direction if needed.

void startNavigation(@NonNull DirectionPoint to, @NonNull DirectionOptions options, @NonNull OnNavigationUpdateListener onNavigationUpdateListener) throws NavigationException;
void stopNavigation();

public interface OnNavigationUpdateListener {
    boolean shouldRecomputeNavigation(@NonNull NavigationInfo navigationInfo);
    void navigationWillStart();
    void navigationDidStart();
}

NavigationInfo contains 3 parameters :

Depends on those information, you can return true or false in the shouldRecomputeNavagation method to let the SDK recompute or not a new Direction.

Styling places

Do you want to show if a meeting room is available or not, or color the prefered shops of the user? Then dynamic styling of places is what you are looking for.

You can overwrite the style of any place at any time using the setPlaceStyle function. Set the style to nil to return to the default style.

void setPlaceStyle(@NonNull Place place, @Nullable Style style);
void setPlaceStyleWithId(@NonNull String placeId, @Nullable Style style);
void setPlacesStyleWithIds(@NonNull Map<String, Style> styleByPlaceId);
void setPlacesStyle(@NonNull Map<Place, Style> styleByPlace);
void setPlaceStyle(@NonNull List<Place> places, @Nullable Style style);
void removeAllCustomStyle();

The available attributes for the style are

Offline

Maps can be made available offline using the OfflineManager. When offline, the following features are available:

Data is downloaded for specific universes of specific venues.

If a venue/universe has been taken offline, all data for that venue/universe will come from the local database regarless the network availability. Changes made to the venue map on Mapwize Studio will not be available in the app until a new download is done. It is the developer's responsibility to trigger venue re-downloads.

MWZOfflineManager

To download content for a specific universe of a venue and make that venue/universe available offline, use downloadData:

public void downloadData(@NonNull Venue venue, @NonNull Universe universe, @NonNull DownloadTaskListener listener)

// If you choose to skip the Mapbox data download, you have to handle it by yourself. Mapwize need atleast one Mapbox Offline region to display properly a Venue.
public void downloadData(@NonNull Venue venue, @NonNull Universe universe, boolean skipMapboxDownload @NonNull DownloadTaskListener listener)

To update the local data for a venue, the same downloadData method can be used again.

If a venue/universe does not need to be offline anymore, removeData can be used to delete all data from database and filesystem.

public void removeData(@NonNull Venue venue, @NonNull Universe universe)

Note: After removing or downloading data, displayed maps need to be refreshed using MapwizePlugin#refresh(Venue venue, Universe universe). Otherwise, maps might not display properly or be inconsistent.

The following methods allow you to check which venues and universes are available offline.

// Check if a venue/universe is offline or not
public boolean isVenueUniverseOffline(@NonNull Venue venue, @NonNull Universe universe)

// Get the list of offline venues
public List<Venue> getOfflineVenues();

// Get the list of offline universes for a venue
public List<Universe> getOfflineUniversesForVenue(@NonNull Venue venue)

API

A complete set of functions are available to query raw Mapwize objects.

Some API functions are available offline if the venue and universe was downloaded using the MWZOfflineManager.

The API behaviour is as follows:

Parameters

ApiFilter

private final String venueId;
private final String universeId;
private final Boolean isVisible;
private final String alias;
private final String name;
private final Double floor;
private final String organizationId;
private final Double latitudeMin;
private final Double latitudeMax;
private final Double longitudeMin;
private final Double longitudeMax;

SearchParams

private String query;
private String venueId;
private String organizationId;
private String universeId;
private String[] objectClass;

Requests

Access

Access are not available offline.

Access can be granted at runtime by calling the Api directly :
java
public static void getAccess(@NonNull String accessKey, @NonNull final ApiCallback<Boolean> callback);

Using this, you have to refresh the MapwizePlugin manually using MapwizePlugin.refresh(OnAsyncTaskReady callback);

You can also call the grantAccess method on the MapwizePlugin. This method handle the Api call and the refresh.
java
public static void grantAccess(@NonNull String accessKey, @NonNull final ApiCallback<Boolean> callback);

You can also sign in (and sign out) with the following methods. Sign in will give you all access that you have on studio.mapwize

public static void signin(@NonNull String token, @NonNull ApiCallback<Boolean> callback)
public static void signout(@NonNull ApiCallback<Boolean> callback)

Once connected, you can get the user information with the following :

public static void getUserInfo(@NonNull ApiCallback<UserInfo> callback)

Venues

public static void getVenue(@NonNull String id, @NonNull ApiCallback<Venue> callback);
public static void getVenueWithAlias(@NonNull String alias, @NonNull ApiCallback<Venue> callback);
public static void getVenueWithName(@NonNull String name, ApiCallback<Venue> callback);
public static void getVenues(@NonNull ApiFilter apiFilter, ApiCallback<List<Venue>> callback);

Places

public static void getPlace(@NonNull String id, @NonNull ApiCallback<Place> callback);
public static void getPlaceWithAlias(@NonNull String alias, @NonNull Venue venue, @NonNull ApiCallback<Place> callback);
public static void getPlaceWithName(@NonNull String name, @NonNull Venue venue, @NonNull ApiCallback<Place> callback);
public static void getPlaces(@NonNull ApiFilter apiFilter, @NonNull ApiCallback<List<Place>> callback);

ConnectorPlaces

ConnectorPlaces are not available offline

public static void getConnectorPlaces(@NonNull ApiFilter apiFilter, @NonNull ApiCallback<List<ConnectorPlace>> callback);
public static void getConnectorPlaceWithAlias(@NonNull String alias, @NonNull Venue venue, @NonNull ApiCallback<ConnectorPlace> callback);
public static void getConnectorPlaceWithName(@NonNull String name, @NonNull Venue venue, @NonNull ApiCallback<ConnectorPlace> callback);
public static void getConnectorPlace(@NonNull String id, @NonNull ApiCallback<ConnectorPlace> callback);

PlaceLists

public static void getPlaceList(@NonNull String id, @NonNull ApiCallback<Place> callback);
public static void getPlaceListWithAlias(@NonNull String alias, @NonNull Venue venue, @NonNull ApiCallback<Place> callback);
public static void getPlaceListWithName(@NonNull String name, @NonNull Venue venue, @NonNull ApiCallback<Place> callback);
public static void getPlaceLists(@NonNull ApiFilter apiFilter, @NonNull ApiCallback<List<Place>> callback);

MainSearch & MainFrom

public static void getMainFromForVenue(@NonNull String venueId, @NonNull ApiCallback<List<Place>> callback);
public static void getMainSearchesForVenue(@NonNull String venueId, @NonNull ApiCallback<List<MapwizeObject>> callback)

Layers

Layers are not available offline.

public static void getLayer(@NonNull String id, @NonNull ApiCallback<Layer> callback);
public static void getLayerWithName(@NonNull String name, @NonNull Venue venue, @NonNull ApiCallback<Layer> callback);
public static void getLayers(@NonNull ApiFilter apiFilter, @NonNull ApiCallback<List<Layer>> callback);

StyleSheets

public static void getStyleSheet(@NonNull String id, @NonNull ApiCallback<StyleSheet> callback);

Universes

public static void getUniverses(@NonNull ApiFilter apiFilter, @NonNull ApiCallback<List<Universe>> callback);
public static void getUniverse(@NonNull String id, @NonNull ApiCallback<Universe> callback);
public static void getAccessibleUniverseForVenue(@NonNull String venueId, @NonNull ApiCallback<List<Universe>> callback);

Directions

Directions with waypoints and mutliple "To" parameters are not available offline.

public static void getDirection(@NonNull DirectionPoint from, @NonNull List<? extends DirectionPoint> to, @NonNull List<? extends DirectionPoint> waypoints, boolean isAccessible, boolean waypointOptimize, @NonNull ApiCallback<Direction> callback);
public static void getDirection(@NonNull DirectionPoint from, @NonNull DirectionPoint to, @NonNull List<? extends DirectionPoint> waypoints, boolean isAccessible, boolean waypointOptimize, @NonNull ApiCallback<Direction> callback);
public static void getDirection(@NonNull DirectionPoint from, @NonNull List<? extends DirectionPoint> to, boolean isAccessible, @NonNull ApiCallback<Direction> callback);
public static void getDirection(@NonNull DirectionPoint from, @NonNull DirectionPoint to, boolean isAccessible, @NonNull ApiCallback<Direction> callback);

Distances

Distances are not available offline.

You can get a list of distance between a 'from' point to a list of 'to' points using :

 public static void getDistances(@NonNull DirectionPoint from, @NonNull List<DirectionPoint> to, boolean isAccessible, boolean sortByTraveltime, @NonNull ApiCallback<DistanceResponse> callback)

Searches

The offline search does not return the same results as the online search.

public static void search(@NonNull SearchParams params, @NonNull ApiCallback<List<MapwizeObject>> callback)

Using a custom Mapwize Server

If you are using a custom instance of Mapwize server you have to set the server URL in your MapwizeConfiguration.

The default parameters are :

serverScheme = "https";
serverHost = "api.mapwize.io";
serverApiPath = "v1/";

Evolution and support

For any question or request, please contact us at support@mapwize.io.