views:

535

answers:

3

Is there a library in Flash to access and draw vector data from OpenStreetMap?

+1  A: 

I just found this page with a hint to a Flash library for OpenStreetMap: Using OpenStreetMap. It links on the following page:

Advanced Flash Components

It shows a little demo with Flash showing Live Maps (Bing Maps). The description says it will work with OpenStreetMap, too, but I haven't found a demo with it.

Update: In the showcase, I discovered GSP Mission that is able to show OpenStreetMap. Looks very neat, I admit.

Have a try!

furtelwart
Sure they draw the pixel map tiles, but I'm looking for a solution that draws the vector data getting from api calls(http://wiki.openstreetmap.org/wiki/API_v0.6#Retrieving_map_data:_GET_.2Fapi.2F0.6.2Fmap). Sadly, Advanced Flash Components doesn't support the osm, but kml format and openstreetmap doesn't support kml but osm.
eskimoblood
Rendering OSM data live on the client is very heavy weight. You should filter the data very well, otherwise your client is blocked a long time.
furtelwart
Yes I know, only a 50m x 50m area should be drawn.
eskimoblood
Hm... that's not much, but I don't know rendering libraries for Flash...
furtelwart
After all I'll make it using Advanced Flash Components. It supports creating polygons from kml. So I've do convert osm to kml. But this seems not that big deal for my needs.
eskimoblood
Ok, interesting approach. Less more effort than writing your own renderer in Flash :)
furtelwart
+1  A: 

One option would be to use OpenLayers, which can draw OpenStreetMap data. One example use of this is the data layer on the OpenStreetMap website (Click the blue + in the top right and the check data).

Alternatively you could look into the upcoming replacement to the current online OpenStreetMap editor Potlatch, which has a data viewer fully built in flash, which in active development. Search for Potlatch 2/Halcyon.

http://www.geowiki.com/?page%5Fid=26 which links to an example of it in action.

Shaun McDonald
Welcome to StackOverflow! The 2nd part of your answer is quite nice, haven't thought of it yet. The first part does not help at all, because OpenLayers does not draw (resp: render) the tiles but shows the tiles, delivered by a tileserver, in the client. That's a difference. Nonetheless +1.
furtelwart
http://www.openstreetmap.org/browse/way/26242773 is another example where OpenLayers loads OSM data and then renders it as a line in the small map. Apologies for not explaining fully first time round.
Shaun McDonald
+1  A: 

See Halcyon. It is an OSM rendering engine written in flash. It downloads and renders vector data, not pre-rendered tiles.

rjmunro