Wikimapia and Google Satellite

1,014 views
Skip to first unread message

pelya

unread,
Mar 29, 2012, 11:22:31 AM3/29/12
to Osmand
Hi.
I've noticed that you have support for WikiMapia inside OsmAnd,
however you're just rendering tiles, and not using their public vector-
based API (so all text strings are upwards-down if you're looking at
south). Is that just a missing feature, or you may not use it because
of WikiMapia license conditions?

Also there's no Google Satellite map, I've noticed it was present but
removed. Also a licensing issue, or they've just changed URL?

Pavol Zibrita

unread,
Apr 11, 2012, 7:56:09 AM4/11/12
to osm...@googlegroups.com
Hi!

Google repeatly changes its links to avoid missues of the tiles.
If there is someone willing to update the google urls, he is probably
welcome by other people. Using github and pull requests

I don't understand fully the wikimapia problem. Osmand can display
its own converted obf files. It is not customized to use any other vector api.
And osmand can display online tile sources, which is the case for
wikimapia in osmand.

Best regards,
Pavol

pelya

unread,
Apr 11, 2012, 3:36:56 PM4/11/12
to osm...@googlegroups.com
So there are no ideological or licensing reasons for not using them, that's good to hear.

Showing the tiles from Wikimapia is rather crippled, because it shows a name only for the objects which are at the center of the tile,
so even zooming to the max won't show you a label for most objects (just try it out yourself, and compare to the web interface at wikimapia.org).
On the other hand, the vector-based API that Wikimapia provides will also give you an object description, and it will give you a name/description in a selected language, if available.
Also, with vector maps you'll have all the labels rotated correctly when you fix the map rotation to the compass.

Currently I'm trying to implement Wikimapia vector API support, no promises about when it will be done though.
I already added the code that will download an .xml vector data for the given tile, now I'm trying to understand how to output that on the screen.
Is it better just to convert the vector data to the .obf format on the fly? That means making a separate.obf file for each tile, I think that's overkill for the memory usage, though it's quite simple.
Or just hack into the ResourceManager.java, and replace BitmapFactory.decodeFile() call with a function that will produce a bitmap picture out of the .xml vector data, and call BitmapFactory.decodeFile() for other formats? That seems like the fastest way to get it working (but the labels won't rotate).
Is it better to create another OsmandMapLayer subclass, that will show that .xml data? That's most complicated way, however most correct one in the long term (later I may wish to add support for photos and user comments, they are not provided through the API though, however you already have the code to fetch Wikipedia articles, it may be reused I think).

Pavol Zibrita

unread,
Apr 12, 2012, 4:41:44 AM4/12/12
to osm...@googlegroups.com
Hi!

   Interesting approach and API. I think converting to obf is nonsense in this case, if you want it to be online. If I understand it, you get an an xml 'osm' file describing objects in the are you want to display instead of the tile itself.
Creating a new layer would be probably good for this. I can imagine it could share a lot with the vector layer.
Basically, the vector layer consists of loading data and then redering them. The approach would be than change the data loading to use the vector API from xml, and correctly convert the objects to osmand structures so that they can be rendered. This might be a little tricky I suppose, as this migth need some conversions which use rendering types.xml and other stuff mainly in OsmandMapCreator only. But it would be nice to see it working.

And later, there will be probably need to somehow cache the xml-s for the regions... Question is, how the API reflects the data when you select some zoom level, if it is more detailed or you have to select the objects yourself, etc.

Best regards,
Pavol
Reply all
Reply to author
Forward
0 new messages