mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.22k stars 2.23k forks source link

Uncaught Error: Unimplemented type: 3 #2606

Closed stackTom closed 8 years ago

stackTom commented 8 years ago

mapbox-gl-js version:

Steps to Trigger Behavior

  1. set up this tile server https://github.com/klokantech/tileserver-php
  2. set up a local development environment, and tiles work accessing them from localhost
  3. put these on a new apache install, and they don't work

    Expected Behavior

vector tiles should work both in local environment and on live server

Actual Behavior

vector tiles don't work live server, producing error, Uncaught Error: Unimplemented type: 3

When I use a local development environment with vagrant for laravel and mamp for my tile server, the tiles are served properly. When I upload the site to a microsoft azure linux ubuntu vm, I get the above error. I was originally running into trouble because CORS was not working, then I got that to work, and everything seems okay, but now mapbox gl js complains of unimplemented error 3 and the tiles never appear. Here is an example tile http://insarvmcsc431.cloudapp.net:8888/t/0/0/0.pbf

I checked for gzip encoding and disabled, still the same issue. So, I've re-enabled it, but the headers do show gzip encoding as recommended on another thread. What can I do?

tmcw commented 8 years ago

Hi! tileserver-php delivers tiles generated from a different system. How did you generate the MBTiles data that the server is serving?

stackTom commented 8 years ago

Hello, I generated the MBTiles using tippecanoe. With mamp serving as the server, it works great. When I run the server my ubuntu vm using apache 2 and php 5, I get the error. The input data is geoJSON, which is valid as far as I know (it works as a geoJSONSource in mapbox gl js, and tippecanoe doesn't complain). The geoJSON is a feature collection with around 1 million points, each point simply has basic geometry (lat/long) and under properties, an array called displacements, containing float values. Thanks for any help.

stackTom commented 8 years ago

It appears this error is thrown when a variable named i doesn't equal Pbf.Fixed64. I just wish I knew why this variable is not equaling what it should. It must be something in the way I've configured apache vs the way mamp configures it, but what?

stackTom commented 8 years ago

I reinstalled and reconfigured apache2, as well as regenerating my mbtile on the server, and it seems to work now. Seems the issue was with my apache server and not with mapbox gl js.