galli_vector_package 0.0.1 copy "galli_vector_package: ^0.0.1" to clipboard
galli_vector_package: ^0.0.1 copied to clipboard

A Galli vector map widget that displays a map with custom markers, lines, circles and polygons.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:galli_vector_package/galli_vector_package.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
          body: SafeArea(
        child: GalliMap(size: (
          width: MediaQuery.sizeOf(context).width,
          height: MediaQuery.sizeOf(context).height
        ), authToken: "token"),
      )),
    );
  }
}

// class VectorMap extends StatefulWidget {
//   const VectorMap({super.key});

//   @override
//   State<VectorMap> createState() => _VectorMapState();
// }

// class _VectorMapState extends State<VectorMap> {
//   MapLibreMapController? controller;
//   GalliMethods methods = GalliMethods("token");
//   // List<Marker> markers = [];
//   late void Function() clearMarkers;
//   @override
//   Widget build(BuildContext context) {
//     return Scaffold(
//       body: SafeArea(
//         child: Center(
//           child: GalliMap(
//             showCurrentLocation: true,
//             authToken: "token",
//             size: (
//               height: MediaQuery.of(context).size.height * 2,
//               width: MediaQuery.of(context).size.width * 2,
//             ),
//             compassPosition: (
//               position: CompassViewPosition.topRight,
//               offset: const Point(32, 82)
//             ),
//             showCompass: true,
//             onMapCreated: (newC) {
//               controller = newC;

//               setState(() {});
//             },
//             onMapClick: (LatLng latLng) {
//               // methods.get360Image(latLng).then((value) {
//               //   if (value != null) {
//               //     GalliViewer galliViewer = GalliViewer(
//               //       builder:
//               //           (BuildContext context, Function() methodFromChild) {
//               //         clearMarkers = methodFromChild;
//               //       },
//               //       image: value,
//               //       onTap: (latitude, longitude, tilt) {},
//               //       markers: markers,
//               //       maxMarkers: 2,
//               //     );
//               //     Navigator.push(
//               //         context,
//               //         MaterialPageRoute(
//               //             builder: (_) => Scaffold(
//               //                 appBar: AppBar(
//               //                   actions: [
//               //                     GestureDetector(
//               //                         onTap: () {
//               //                           clearMarkers();
//               //                         },
//               //                         child: const Text("Clear"))
//               //                   ],
//               //                 ),
//               //                 body: galliViewer)));
//               //   } else {
//               //     log("Image not found");
//               //   }
//               // });

//               // String? data =
//               //     await galliMapController!.reverGeoCoding(latLng);
//               log("latlng $latLng");
//             },
//           ),
//         ),
//       ),
//     );
//   }
// }
0
likes
0
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

A Galli vector map widget that displays a map with custom markers, lines, circles and polygons.

Homepage

License

unknown (license)

Dependencies

flutter, flutter_cube, geolocator, http, maplibre_gl

More

Packages that depend on galli_vector_package