Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You want something like MapDroyd, maybe talk to them about using their code.</p> <p>Alternatively take the OpenStreetMap widget from here <a href="http://code.google.com/p/osmdroid/" rel="nofollow noreferrer">http://code.google.com/p/osmdroid/</a> and add a way to cache regions. For the street name index you can download the world.osm (or just part of it to save time) and then run it through a python script like this:</p> <p>(Note that this needs some work: it doesn't handle duplicate street names, so you'll have to modify it a bit. It also finds pubs and ATMs.)</p> <pre><code>#!/usr/bin/python from xml.dom import pulldom doc = pulldom.parse("england.osm") #outFile = open("england.txt", "w") nodes = {} ways = {} pubs = [] atms = [] i = 0 for event, node in doc: if event == pulldom.START_ELEMENT: if node.localName == "node": doc.expandNode(node) nodeID = node.getAttribute("id") nodeLat = node.getAttribute("lat") nodeLon = node.getAttribute("lon") amenity = ""; for tag in node.getElementsByTagName("tag"): if tag.getAttribute("k") == "amenity": amenity = tag.getAttribute("v") nodes[int(nodeID)] = ( float(nodeLat), float(nodeLon) ) if amenity == "pub": pubs.append(int(nodeID)) elif amenity == "atm" or amenity == "bank": atms.append(int(nodeID)) elif node.localName == "way": doc.expandNode(node) name = ""; for tag in node.getElementsByTagName("tag"): if tag.getAttribute("k") == "name": name = tag.getAttribute("v") if name == "": continue; wayName = name.encode("latin-1", "replace") refList = [nd.getAttribute("ref") for nd in node.getElementsByTagName("nd")] if ways.has_key(wayName): ways[wayName].append([int(x) for x in refList]) else: ways[wayName] = [int(x) for x in refList] i = i + 1 if i % 100 == 0: print(i / 100) print(nodes) print(ways) print(pubs) print(atms) #outFile.close() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload