none
mbtiles format support in Bing Maps RRS feed

  • Question

  • I saw maps from http://mapbox.com/#/ with mbtiles format (for example iraq map via http://mapbox.com/#/tileset/iraq). What do I need to do if I want to overlay on top/below of Bing Maps?
    Umapathy (உமாபதி) MCITP: Enterprise Support Technician, Consumer Support Technician MCTS: Windows Vista - Configuration, BSc, MCP, A+, MCDST
    • Moved by Ricky_Brundritt Saturday, March 10, 2012 10:57 AM (From:Bing Maps: Map Control and Web services Development)
    Monday, September 5, 2011 10:44 AM

Answers

  • mbtiles are just a sqllite database containing binary data of a set of tile images. So, to access those tiles you need a sqllite reader (there's sqllite readers for loads of different languages - PHP/.NET/Java/Ruby) - search the internet of try http://www.sqlite.org/download.html to start with.

    Having retrieved the appropriate tile image from the mbtiles database file, you can pass that as a tilesource to a map.

    Strangely enough, I started to write a blog post on this several months ago and never got round to finishing it... perhaps I'll dig it out.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, September 5, 2011 11:20 AM
    Moderator
  • I don't know much about the Firefox database, so I'm not sure how/if you could access this from Javascript. What I meant was instead to access the .mbtiles file from a handler - if you're using the Bing Maps AJAX control on a website, you could pass the quadkey of each tile requested to a PHP or .NET handler, for example, that opened the .mbtiles file, retrieved the appropriate tile image from the sqllite database, and streamed it back to the browser as a image/jpeg content type.

    If you're using the Silverlight/WP7/WPF control, you should be able to access the .mbtiles file directly from within your C#/VB.Net code by importing the .NET sqllite reader from System.Data.SqLite (http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki)


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, September 5, 2011 12:41 PM
    Moderator

All replies

  • mbtiles are just a sqllite database containing binary data of a set of tile images. So, to access those tiles you need a sqllite reader (there's sqllite readers for loads of different languages - PHP/.NET/Java/Ruby) - search the internet of try http://www.sqlite.org/download.html to start with.

    Having retrieved the appropriate tile image from the mbtiles database file, you can pass that as a tilesource to a map.

    Strangely enough, I started to write a blog post on this several months ago and never got round to finishing it... perhaps I'll dig it out.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, September 5, 2011 11:20 AM
    Moderator
  • tanoshimi, I am sorry I couldn't grab much information about mbtiles. The browser right now I am using firefox is having sqlite database. So can run inside firefox? about the maps which I downloaded it. What do I need to do? what do I need to do if I want to overlay Bing Maps. If possible can you elaborate further? You are one of the few person seems to be active in the Bing Maps forum.  Thanks in advance.
    Umapathy (உமாபதி) MCITP: Enterprise Support Technician, Consumer Support Technician MCTS: Windows Vista - Configuration, BSc, MCP, A+, MCDST
    Monday, September 5, 2011 11:44 AM
  • I don't know much about the Firefox database, so I'm not sure how/if you could access this from Javascript. What I meant was instead to access the .mbtiles file from a handler - if you're using the Bing Maps AJAX control on a website, you could pass the quadkey of each tile requested to a PHP or .NET handler, for example, that opened the .mbtiles file, retrieved the appropriate tile image from the sqllite database, and streamed it back to the browser as a image/jpeg content type.

    If you're using the Silverlight/WP7/WPF control, you should be able to access the .mbtiles file directly from within your C#/VB.Net code by importing the .NET sqllite reader from System.Data.SqLite (http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki)


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, September 5, 2011 12:41 PM
    Moderator
  • To make it real, in our company, we developed a tile server that reads MBTiles, OracleSpatial, MSSql and File System tile files. The server reads the images from those various formats and serve them as Tile images. From MS Bings or other common client interfaces (like open street layers or gmaps) you can request the tile images and overlay them with the basemaps (satellite, hybrid, road maps etc...).

     

    I guess the best solution for you will be to use a Tile Server like TileMill etc...

     

    ---------------------------------------------------------------

    Ozgehan OZEN

    Geosys Ltd. www.geosys.com.tr

    Friday, September 9, 2011 7:10 PM
  • @ozgehan, thanks for the reply. I found a way to do some testing via http://support.mapbox.com/kb/introduction-installation/tilemill-virtualbox-vm Oracle virtual box with ubuntu linux guest os. But still I couldn't find a way an easy way run through windows apart from running through a virtual clinet. I initially thought Bing maps support it but it looks like not the case.
    Umapathy (உமாபதி) MCITP: Enterprise Support Technician, Consumer Support Technician MCTS: Windows Vista - Configuration, BSc, MCP, A+, MCDST
    Friday, September 16, 2011 9:23 AM