Using Tilestache with MBTiles

207 views
Skip to first unread message

Andrew

unread,
Apr 17, 2013, 8:46:32 PM4/17/13
to tiles...@googlegroups.com
Hey guys,

I was wondering if anyone could give me some help with the procedure for configuring Tilestache to serve MBtiles with GPS data overlaid. I'm new to mapping and having a bit of trouble getting my head round how to do this. Essentially I want to be able to provide a link that can display the tiles with GPS data overlaid, displaying each point with possibly some pop-up information as well. This would be similar to when Google Maps displays a trip when asked for directions but with additional data points. The data would come from a remote SQL database that stores longitude, latitude and information about each data point.

I've created an MBtileset in TileMill using the OSM Bright style with some raster images overlaid, drawing the data from a PostGIS database. However I'm not sure where to go from here, do I just need to configure TIlestache to use these tiles or is Mapnik involved as well? How do I overlay the trip data over the tiles when requested? Any help would be greatly appreciated.

Thanks,

Andrew


Michal Migurski

unread,
Apr 18, 2013, 1:40:04 AM4/18/13
to tiles...@googlegroups.com
Hi Andrew,

There's a lot in your question so I'll answer the simplest way I know. If you have an MBTileset, you should no longer need Mapnik. You can configure the MBTiles provider, documented here:
http://tilestache.org/doc/#mbtiles-provider

It only takes one parameter, a path to your .mbtiles file. That should be enough to serve tiles over HTTP.

For overlaying trip data, I imagine you'd likely want to overlay some kind of vector data with Leaflet or similar, but that's a fairly separate question.

-mike.
> --
> You received this message because you are subscribed to the Google Groups "Tilestache" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

----------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html




Andrew

unread,
Apr 30, 2013, 2:25:27 AM4/30/13
to tiles...@googlegroups.com
Hey Mike,

Thanks for that. I still seem to be having some issues getting it to work. My cfg looks like:

{
  "cache": { … }.
  "layers":
  {
    "roads":
    {
      "provider":
      {
        "name": "mbtiles",
        "tileset": "/home/test/tiles/australia.mbtiles"
      }
    }
  }
}

I know it's probably quite obvious but might you or someone else be able to point out what I'm doing wrong here? I tried running it with a different cfg that used proxy OSM tiles as a test and that seemed to work fine so I'm assuming there's something wrong with my cfg file. Tinkering with various parts of it didn't seem to help fix anything so I'm at a bit of a loss. Thanks for any input you guys can give me.

- Andrew
Reply all
Reply to author
Forward
0 new messages