Skip to Content
API ReferenceCoreLazarilloMaps

LazarilloMaps

High-level API for Lazarillo Maps.

Create an instance with your API key, call initialize, then use getLazarilloMapWidget to embed the map in your widget tree.

final lazarilloMaps = LazarilloMaps('your-api-key'); await lazarilloMaps.initialize(); final widget = lazarilloMaps.getLazarilloMapWidget( MapConfiguration(latitude: 40.71, longitude: -74.00), (mapId) => print('Map ready: $mapId'), );

Constructors

LazarilloMaps.new

LazarilloMaps.new(String apiKey)

Creates a new LazarilloMaps instance with the given apiKey.

Properties

PropertyTypeDescription
apiKeyStringThe API key used to authenticate with the Lazarillo platform. (final)

Methods

addRoute

addRoute(RouteConfiguration routeConfiguration) → Future<LzRoute?>

Creates a route on the map with enhanced origin handling and fallback logic.

clearRoute

clearRoute(String mapId) → Future<void>

Removes the current route from the map identified by mapId.

followUserLocation

followUserLocation(String mapId, bool follow, {double? pitch, double? zoom}) → Future<void>

Follow user location on the map mapId refers to the identifier of the map you are pointing to follow indicates whether to follow user location or not pitch optional pitch angle in degrees zoom optional zoom level

getLazarilloMapWidget

getLazarilloMapWidget(MapConfiguration mapConfiguration, dynamic onMapReady(String)?) → LazarilloMapWidget

Creates a LazarilloMapWidget configured with the given parameters.

getPlaceInfo

getPlaceInfo(String id) → Future<LzPlace?>

Fetches detailed information for a place by its Lazarillo id.

getPlacesForApiKey

getPlacesForApiKey(String apiKey) → Future<List<LzPlace?>

Retrieves all places available for the given apiKey.

getPlatformVersion

getPlatformVersion() → Future<String?>

Returns the platform version string (e.g. “Android 14” or “iOS 17.0”).

getSubPlacesById

getSubPlacesById(String id) → Future<List<LzPlace?>

Retrieves sub-places (children) of the place with the given id.

hideLocationOnMap

hideLocationOnMap(String mapId) → Future<void>

Hides the user’s location indicator from the map identified by mapId.

initialize

initialize() → Future<void>

Initializes the Lazarillo Maps plugin.

setBearing

setBearing(String mapId, double bearing) → Future<void>

Set the bearing (rotation) of the map camera mapId refers to the identifier of the map you are pointing to bearing bearing angle in degrees

setParentPlaceId

setParentPlaceId(String? id) → Future<void>

Sets the parent place context for the SDK.

setPitch

setPitch(String mapId, double pitch) → Future<void>

Set the pitch (tilt) of the map camera mapId refers to the identifier of the map you are pointing to pitch pitch angle in degrees

showLocationOnMap

showLocationOnMap(String mapId) → Future<void>

Shows the user’s location indicator on the map identified by mapId.

startUpdatingLocation

startUpdatingLocation(void callback(Position)) → Future<void>

Starts receiving location updates via callback.

stopUpdatingLocation

stopUpdatingLocation() → Future<void>

Stops receiving location updates previously started with startUpdatingLocation.

Last updated on