Docs · Flutter

Frameworks

Flutter

The maplibre_gl plugin with the Orvia style URL.

Example

orvia_map.dartdart
1// pubspec.yaml: maplibre_gl: ^0.22.02import 'package:flutter/material.dart';3import 'package:maplibre_gl/maplibre_gl.dart';45const styleUrl = 'https://orviamaps.ir/api/v1/style.json?key=YOUR_API_KEY';67class OrviaMap extends StatelessWidget {8  const OrviaMap({super.key});910  @override11  Widget build(BuildContext context) {12    return const MapLibreMap(13      styleString: styleUrl,14      initialCameraPosition: CameraPosition(15        target: LatLng(35.689, 51.389), // Tehran16        zoom: 11,17      ),18    );19  }20}

Replace YOUR_API_KEY with a key from your account, or read it from an environment variable as shown.