Hi,

I was looking in to getting Viking to load OSM POIs into waypoints via the
File->Acquire-> options.  It can already be done reasonably well with the
current datasources.xml set up, but doesn't allow the option of a user
specified search term.

I've created a branch called datasource-search at

    https://github.com/yourealwaysbe/viking.git

which adds an S to the url_format_code where S represents "search term".  If
an S appears in the url_format_code, it will flash up a text box asking the
user to enter a term.

Further, as part of this, i've added another property

    babel_filter_args

where the user can specify in datasources.xml some command line arguments to
pass to gpsbabel to refine the output.  I have a reason for wanting to do
this, but will spare you a rambling explanation unless you'd like to hear it
:)

As an example, you might try adding to your ~/.viking/datasources.xml

    <objects>
      <object class="VikWebtoolDatasource">
        <property name="label">OpenStreetAmenity</property>
        <property name="url_format_code">BLTRS</property>
        <property name="file_type">osm</property>
        <property 
name="url">http://overpass-api.de/api/interpreter?data=[bbox:%s,%s,%s,%s];node[amenity="%5$s"];out%%20center;</property>
      </object>
    </object>

to give you an option to acquire all amenities on OSM of a certain kind
currently on screen.  E.g. enter "cafe" as the search term for all cafes,
"pubs" for all pubs, and so on.  (It's for an improved version of this that
babel_filter_args comes in to play.)

Let me know what you think,

Best,

Matt


------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to