Pregunta

I have an obf file I would like to include in my app (it was prepared in the obf format so that people could use it inside OSMAnd).

Does OSMDroid support this format? If no, can I easily convert it to some format OSMDroid supports (MAPNIK?)?

¿Fue útil?

Solución

I think the answer is no - there is no native support for obf files. If this is a simple compressed archive of tile imagery then I would suggest you write your own IArchiveFile implementation.

But it appears that OBF files are vector maps which makes it more complicated. You could write an overlay that reads the vector data and then draw it using canvas drawing (drawLine(), etc...). The other option is to write a modular tile provider that reads in the vector data and "draws" it to a BitmapDrawable tile or maybe even creates a ShapeDrawable. I am not very familiar with obf files, but it doesn't sound likely that you can convert them from vector to raster images (like Mapnik style) easily.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top