]> git.openstreetmap.org Git - rails.git/commitdiff
and the accompanying SWF
authorRichard Fairhurst <richard@systemed.net>
Thu, 9 Jul 2009 20:00:29 +0000 (20:00 +0000)
committerRichard Fairhurst <richard@systemed.net>
Thu, 9 Jul 2009 20:00:29 +0000 (20:00 +0000)
config/potlatch/icon_presets.txt [new file with mode: 0644]
config/potlatch/localised/en/help.html
lib/potlatch.rb
public/potlatch/potlatch.swf

diff --git a/config/potlatch/icon_presets.txt b/config/potlatch/icon_presets.txt
new file mode 100644 (file)
index 0000000..3269286
--- /dev/null
@@ -0,0 +1,26 @@
+airport        Airport amenity=airport
+bus_stop       Bus stop        highway=bus_stop
+ferry_terminal Ferry   amenity=ferry_terminal
+parking        Parking amenity=parking
+station        Rail station    railway=station
+taxi   Taxi rank       amenity=taxi
+bar    Bar     amenity=bar
+cafe   Cafe    amenity=cafe
+cinema Cinema  amenity=cinema
+fast_food      Fast food       amenity=fast_food
+pub    Pub     amenity=pub
+restaurant     Restaurant      amenity=restaurant
+theatre        Theatre amenity=theatre
+convenience    Convenience shop        shop=convenience
+hotel  Hotel   tourism=hotel
+pharmacy       Pharmacy        amenity=pharmacy
+post_box       Postbox amenity=post_box
+recycling      Recycling       amenity=recycling
+supermarket    Supermarket     shop=supermarket
+telephone      Telephone       amenity=telephone
+fire_station   Fire station    amenity=fire_station
+hospital       Hospital        amenity=hospital
+police Police station  amenity=police
+place_of_worship       Place of worship        amenity=place_of_worship
+museum Museum  tourism=museum
+school School  amenity=school
index 935429077ca239ecad51befef4ea7fc90834c8a6..e69f4b00fe6389d502a9b173c145ced628938873 100755 (executable)
@@ -36,7 +36,32 @@ Did we mention about not copying from other maps?
 
 <!--
 ========================================================================================================================
-Page 2: Surveying
+Page 2: getting started
+
+--><page/><headline>Getting started</headline>
+<bodyText>Now that you have Potlatch open, click 'Edit with save' to get started.
+       
+So you're ready to draw a map. The easiest place to start is by putting some points of interest on the map - or "POIs". These might be pubs, churches, railway stations... anything you like.</bodytext>
+
+<column/><headline>Drag and drop</headline>
+<bodyText>To make it super-easy, you'll see a selection of the most common POIs, right at the bottom of the map for you. Putting one on the map is as easy as dragging it from there onto the right place on the map. And don't worry if you don't get the position right first time: you can drag it again until it's right. Note that the POI is highlighted in yellow to show that it's selected.
+       
+Once you've done that, you'll want to give your pub (or church, or station) a name. You'll see that a little table has appeared at the bottom. One of the entries will say "name" followed by "(type name here)". Do that - click that text, and type the name.
+
+Click somewhere else on the map to deselect your POI, and the colourful little panel returns.
+
+Easy, isn't it? Click 'Save' (bottom right) when you're done.
+</bodyText><column/><headline>Moving around</headline>
+<bodyText>To move to a different part of the map, just drag an empty area. Potlatch will automatically load the new data (look at the top right).
+
+We told you to 'Edit with save', but you can also click 'Edit live'. If you do this, your changes will go into the database straightaway, so there's no 'Save' button. This is good for quick changes and <a href="http://wiki.openstreetmap.org/wiki/Current_events" target="_blank">mapping parties</a>.</bodyText>
+
+<headline>Next steps</headline>
+<bodyText>Happy with all of that? Great. Click 'Surveying' above to find out how to become a <i>real</i> mapper!</bodyText>
+
+<!--
+========================================================================================================================
+Page 3: Surveying
 
 --><page/><headline>Surveying with a GPS</headline>
 <bodyText>The idea behind OpenStreetMap is to make a map without the restrictive copyright of other maps. This means you can't copy from elsewhere: you must go and survey the streets yourself. Fortunately, it's lots of fun!
@@ -63,33 +88,38 @@ On this same options button you'll find a few other choices like an out-of-copyr
 
 Sometimes satellite pics are a bit displaced from where the roads really are. If you find this, hold Space and drag the background until it lines up. Always trust GPS tracks over satellite pics.</bodytext>
 
-<page/><headline>Drawing ways</headline>
-<bodyText>Now that you have Potlatch open, click 'Edit with save' to get started.
+<!--
+========================================================================================================================
+Page 4: Drawing
 
-To draw a road (or 'way') starting at a blank space on the map, just click there; then at each point on the road in turn. When you've finished, double-click or press Enter - then click somewhere else to deselect the road.
+--><page/><headline>Drawing ways</headline>
+<bodyText>To draw a road (or 'way') starting at a blank space on the map, just click there; then at each point on the road in turn. When you've finished, double-click or press Enter - then click somewhere else to deselect the road.
 
 To draw a way starting from another way, click that road to select it; its points will appear red. Hold Shift and click one of them to start a new way at that point. (If there's no red point at the junction, shift-click where you want one!)
 
 Click 'Save' (bottom right) when you're done. Save often, in case the server has problems.
 
-Don't expect your changes to show instantly on the main map. It usually takes an hour or two, sometimes up to a week.</bodyText>
+Don't expect your changes to show instantly on the main map. It usually takes an hour or two, sometimes up to a week.
 </bodyText><column/><headline>Making junctions</headline>
 <bodyText>It's really important that, where two roads join, they share a point (or 'node'). Route-planners use this to know where to turn.
        
 Potlatch takes care of this as long as you are careful to click <i>exactly</i> on the way you're joining. Look for the helpful signs: the points light up blue, the pointer changes, and when you're done, the junction point has a black outline.</bodyText>
-<headline>More advanced drawing</headline>
-<bodyText><img src="scissors">If two parts of a way have different names, you'll need to split them. Click the way; then click the point where it should be split, and click the scissors. (You can merge ways by Shift-clicking, but don't merge two roads of different names or types.)
+<headline>Moving and deleting</headline>
+<bodyText>This works just as you'd expect it to. To delete a point, select it and press Delete. To delete a whole way, press Shift-Delete.
 
-Deleting a point is easy; select it and press Delete. To delete a whole way, press Shift-Delete.</bodyText>
-<column/><headline>Points of interest</headline>
-<bodyText>Not everything is a line or an area. Sometimes you'll just want to put a point on the map. You do this by double-clicking at the right spot; a green circle appears.</bodyText>
-<headline>Moving around</headline>
-<bodyText>To move to a different part of the map, just drag an empty area. Potlatch will automatically load the new data (look at the top right).
+To move something, just drag it. (You'll have to click and hold for a short while before dragging a way, so you don't do it by accident.)</bodyText>
+<column/><headline>More advanced drawing</headline>
+<bodyText><img src="scissors">If two parts of a way have different names, you'll need to split them. Click the way; then click the point where it should be split, and click the scissors. (You can merge ways by Shift-clicking, but don't merge two roads of different names or types.)
+       
+<img src="tidy">Roundabouts are really hard to draw right. Don't worry - Potlatch can help. Just draw the loop roughly, making sure it joins back on itself at the end, then click this icon to 'tidy' it. (You can also use this to straighten out roads.)</bodyText>
+<headline>Points of interest</headline>
+<bodyText>The first thing you learned was how to drag-and-drop a point of interest. You can also create one by double-clicking on the map: a green circle appears. But how to say whether it's a pub, a church or what? Click 'Tagging' above to find out!
 
-You can also drag ways, points of interest, and points in ways to correct their position. You'll need to click and hold before dragging a whole way, to prevent accidents.
+<!--
+========================================================================================================================
+Page 4: Tagging
 
-We told you to 'Edit with save', but you can also click 'Edit live'. If you do this, your changes will go into the database straightaway, so there's no 'Save' button. This is good for quick changes and <a href="http://wiki.openstreetmap.org/wiki/Current_events" target="_blank">mapping parties</a>.</bodyText>
-<page/><headline>What type of road is it?</headline>
+--><page/><headline>What type of road is it?</headline>
 <bodyText>Once you've drawn a way, you should say what it is. Is it a major road, a footpath or a river? What's its name? Are there any special rules (e.g. "no bicycles")?
 
 In OpenStreetMap, you record this using 'tags'. A tag has two parts, and you can have as many as you like. For example, you could add <i>highway | trunk</i> to say it's a major road; <i>highway | residential</i> for a road on a housing estate; or <i>highway | footway</i> for a footpath. If bikes were banned, you could then add <i>bicycle | no</i>. Then to record its name, add <i>name | Market Street</i>.
@@ -114,7 +144,11 @@ Because OpenStreetMap data is used to make many different maps, each map will sh
 <headline>Relations</headline>
 <bodyText>Sometimes tags aren't enough, and you need to 'group' two or more ways. Maybe a turn is banned from one road into another, or 20 ways together make up a signed cycle route. You can do this with an advanced feature called 'relations'. <a href="http://wiki.openstreetmap.org/wiki/Relations" target="_blank">Find out more</a> on the wiki.</bodyText>
 
-<page/><headline>Undoing mistakes</headline>
+<!--
+========================================================================================================================
+Page 6: Troubleshooting
+
+--><page/><headline>Undoing mistakes</headline>
 <bodyText><img src="undo">This is the undo button (you can also press Z) - it will undo the last thing you did.
 
 You can 'revert' to a previously saved version of a way or point. Select it, then click its ID (the number at the bottom left) - or press H (for 'history'). You'll see a list of everyone who's edited it, and when. Choose the one to go back to, and click Revert.
@@ -146,7 +180,7 @@ Turn your GPS track into a way by finding it in the 'GPS Traces' list, clicking
 
 <!--
 ========================================================================================================================
-Page 6: Quick reference
+Page 7: Quick reference
 
 --><page/><headline>What to click</headline>
 <bodyText><b>Drag the map</b> to move around.
index 1b01a88671b94a1f7a618f85def3e40e6ccdd263..e8de1aa8e1aeafc5ff5750ef0542936913c0ee7f 100644 (file)
@@ -186,6 +186,18 @@ module Potlatch
         }
       end
 
+      # Read POI presets
+      icon_list=[]; icon_names={}; icon_tags={};
+      File.open("#{RAILS_ROOT}/config/potlatch/icon_presets.txt") do |file|
+        file.each_line {|line|
+          (icon,name,tags)=line.chomp.split("\t")
+          icon_list.push(icon)
+          icon_names[icon]=name
+          icon_tags[icon]=Hash[*tags.scan(/([^;=]+)=([^;=]+)/).flatten]
+        }
+      end
+      icon_list.reverse!
+      
       # Read auto-complete
       autotags={}; autotags['point']={}; autotags['way']={}; autotags['POI']={};
       File.open("#{RAILS_ROOT}/config/potlatch/autocomplete.txt") do |file|
@@ -202,7 +214,7 @@ module Potlatch
 #        # Read internationalisation
 #        localised = YAML::load(File.open("#{RAILS_ROOT}/config/potlatch/localised.yaml"))
 
-      [presets,presetmenus,presetnames,colours,casing,areas,autotags,relcolours,relalphas,relwidths]
+      [presets,presetmenus,presetnames,colours,casing,areas,autotags,relcolours,relalphas,relwidths,icon_list,icon_names,icon_tags]
     end
   end
 
index b56526146ce7972f0b0b3f9962c60b1f593fa0a5..c9d81b3af264c48063648923529f68c551378ea5 100755 (executable)
Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ