maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
226 stars 125 forks source link

Tiles are disorderly placed on the screen #472

Closed YLagh01 closed 2 months ago

YLagh01 commented 4 months ago

Platforms

android

Version of flutter maplibre_gl

0.20.0

Bug Description

Hello everyone

I'm trying to display locally hosted (with martin server) tiles on my flutter app, the software shows really good performance but the tiles are disorderly placed which makes it unusable. I'm pretty sure that the problem comes from maplibre gl library as the tiles were perfectly shown on a bunch of other softwares (QGIS, leaflet, ...).

The style file I'm using is in the attached files. osm_liberty(18).json

Any help would be greatly appreciated!

Thank you!

Here is what is displayed on the screen at different zoom levels: Screenshot_20240630_135806 Screenshot_20240630_135816 Screenshot_20240630_135836 Screenshot_20240630_135845

Steps to Reproduce

.

Expected Results

.

Actual Results

.

Code Sample

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

void main() {
  runApp(
    MaterialApp(home: MyApp())
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    //styleUrl is the path to a second locally hosted server which returns a JSON style file
    const styleUrl = "http://192.168.1.28:8000/api";
    return MapLibreMap(
      styleString: styleUrl,
      myLocationEnabled: true,
      initialCameraPosition: const CameraPosition(target: LatLng(0.0, 0.0)),
      trackCameraPosition: true,
    );
  }
}
josxha commented 4 months ago

This is a tile scheme problem. Could it be that sour martin tile server serves tms tiles?

https://maplibre.org/maplibre-style-spec/sources/#scheme

josxha commented 2 months ago

Closing this issue for now. Feel free to provide further information that tie this problem to flutter-maplibre-gl and I'll reopen.