Suppose you made a map in QGIS then used the tool "Generate XYZ Tiles" to create a directory or MBTiles file of XYZ Map Tiles. Is it possible to display that on an Android phone using OSMdroid?
If it isn't, is there another way?
Not sure about osmdroid, but it looks it's possible. For sure you can use tiles in OSMAnd (in a bit weird way, I have to admit, as overlay). OruxMaps supports tiles as well. You can check MOBAC (https://sourceforge.net/projects/mobac/) for possible outputs / programs which accepts the tiles.
For mbtiles with mobac, please see: https://gis.stackexchange.com/questions/294022/open-a-local-mbtiles-map-in-mobile-atlas-creator-mobac
Related
I'm having a really hard time to get OSMDroid working with our custom tile server. I'm getting our tiles in a zip file which has the following structure:
ZoomLevel/Y/X
I've tried unzipping the zip to the osmdroid/tiles folder and the osmdroid/tiles/Mapnik folder but none of them seem work. I think I need to use the FileBasedTileSource but I don't know what to put in the aName and URL part of the method.
I'm trying to download specific areas as a zip file for use in offline situations, which on Google Maps works perfectly but I want to try out OSMDroid and see of the performance is better.
Can anyone give me some pointers on how to get this working?
Zip archives for osmdroid must have the following structure
{Source}/Z/X/Y.{extension}
Then tell osmdroid to use a tile source whose name matches exactly {Source}. Everything should be automatic.
Also, consider using sqlite database, they are generally faster
I am currently trying to import an offline map to nutiteq.
I have downloaded a map from OpenStreetMap but that map has an .osm extension.
How can I import that kind of extension to Android ?
As scai mentions, .osm is raw data file which cannot be directly used. .osm is data exchange format and it needs processing to be used in applications, including apps with Nutiteq SDK. Main missing piece from .osm file is visual styling: .osm file defines coordinates of objects and identity (e.g. that a line is "highway"), but it gives no hint whatsoever how to draw it - with which colors, line width etc.
What I'd suggest to try is to convert .osm file to .map file using osmosis, and then use mapsforge library to render a map like shown in Nutiteq wiki page. Mapsforge includes some default style, but you can find nicer stylesheets. There are several providers for readymade and up-to-date .map files with OpenStreetMap data, so maybe you do not need to do the conversion, one of them is AndroidMaps who even includes even several stylesheets.
.osm is just OSM's XML file format containing elements and tags. That is, it contains raw data. According to the nutiteq website nutiteq doesn't support this format directly. But it supports various other formats like MBTiles which are suitable for offline use.
I have received a customized osm file (map.osm) from my customer to integrate Android project, but I don't know how to use that file, usually I'm using
mapView.setTileSource(TileSourceFactory.MAPNIK);
So, how I can use the map.osm file my android project.
Sorry but AFAIK it doesn't work like that. A Tilesource is a rendered raster map of geodata. Thus you need to render the data first in a local renderer, for example Maperiative or TileMill. They can create a tile folder structure output, that can be used by OSMdroid instead of the official tile sources: http://code.google.com/p/osmdroid/wiki/HowToUsePackager
I need to generate a .sqlitedb map file for an Android app containing the map of a small city, I tried using Mobile Atlas Creator 1.9.14 by itself, but it only displays red crosses, no tiles(I use a proxy with authentication, and i configured it on the settings/network tab), I don't know what to do there. I then heard about Maperitive and I downloaded a .osm.pbf file from GeoFabrik to use as source, generated a Tiles folder i needed and followed this instructions to use it on MOBAC as custom source.
It does nothing at all, I still get the same red crosses everywhere, but everyone else seems to have it working just fine. What am I doing wrong?
Had the same problem, the template file from MOBAC has a lot of comments. After removing them it worked! My xml file is now very simple, even the <sourceType> seems not to be necessary. Here it is:
<localTileFiles><name>Maperitive Tiles</name><sourceFolder>/ed/map_composer/Maperitive/Tiles</sourceFolder><backgroundColor>#00000000</backgroundColor></localTileFiles>
I have to do an application on the Android platform which should load a digital map on the phone. The digital map is a .vsd file and it represents the map of a building. What I need for the moment is when I touch the phone screen inside a room I want to modify the border color of this room (I want to select it in a visual way).
Thanks
Afaik there is no Java library to read/parse/display a MS Visio file (.vsd).
So there is no way to do this, except if you decide to write your own parser and renderer for .vsd files.