I am unsuccessful in attempt to make layer with TileStache whitch gets data from MySQL. I found simple MySQL table structure (http://howto-use-mysql-spatial-ext.blogspot.com/):

create table Points ( 
location Point NOT NULL, 
description VARCHAR(200), 
SPATIAL INDEX(location) 

and then

INSERT INTO Points (name, location) VALUES ( 'point1' , GeomFromText( ' POINT(31.5 42.2) ' ) )

For TileStache in tilestache.cfg I got:

        "provider": {"name": "vector", "driver": "MySQL",
                     "parameters": {"dbname": "gis", "port": "3306", 
                     "user": "root", "password": "root",
                     "table" : "points"}}

When I go to http://localhost:8080/data/ I get in console:

  • GET http://localhost:8080/data/10/167/395.png 500 (Internal Server Error);
  • GET http://localhost:8080/data/null 400 (Bad Request).

Same internal error when going to http://localhost:8080/data/0/0/0.geojson

NOTE: http://localhost:8080/osm/ works fine.

I think problem is global, because I tried making layer from .json file, but same result


Why changing ports. make sure when you start tilestache-server it listens to the correct port and make sure that by going to localhost:port_of_tilestatche it shows. belows tilestache

  • I got some java program running at that port. I stopped it, but still the same errors when listening on port 8080. – user50751 Apr 22 '15 at 5:59

Try running tilestache on a different port. Port 8080 has many things running on it. What OS are you using tilestache-server.py -c your config file -p 9000

Then you can run localhost:9000 and you should get the

  • Port 8080 is ok. The example code "osm" works (localhost:8080/osm). But anyway tried 9000 still the same. – user50751 Apr 22 '15 at 11:22