Re: [OpenMap Users] OpenStreetMap Layer

From: Don Dietrick <dfdietrick_at_email.domain.hidden>
Date: Tue May 18 2010 - 20:10:14 EDT

Hi John,

Thats certainly one way to do it, if the osm files are small enough to fit into memory.

If you want to render an osm directly, you would create a new layer by extending OMGraphicHandlerLayer, and override the prepare() method to create and return an OMGraphicList for display. You would parse the osm file and create OMGraphic objects to add to that list.

For larger files, (and a faster-responding map), you would want to create image tiles. openstreetmap.org has details on how to create your own tile set from the osm files. If you have those, you can use the com.bbn.openmap.layer.image.MapTileLayer to display them (it's in the beta version available via svn on the website).

Hope this helps,

Don

On May 18, 2010, at 5:19 PM, John McMahon wrote:

> Hello All,
>
> I would like to create an OpenStreetMap layer for OpenMap, and I was wondering if anyone had done this before and what it requires. I have OpenStreetMap data in the form of an .osm XML file. Will I just have to parse that XML file and create a class that extends OMGraphicHanderLayer?
>
> I am fairly new to both OpenMap and OpenStreetMap, so any help would be appreciated.
>
> Thanks,
> John

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue May 18 20:18:59 2010

This archive was generated by hypermail 2.1.8 : Tue May 18 2010 - 20:18:59 EDT