Filed under: news
No huge changes, but a handful of useful ones:
- You can now edit GPXs before they’re loaded into the database – perfect for those busy weekend evenings.
- The intermittent ‘repeat tags’ behaviour (present since the first version of Potlatch) has finally been fixed!
- Lots of little bugfixes.
All of Wales and the Marches are now available at 1in-to-the-mile in Potlatch’s out-of-copyright map layer. The scans are from the New Popular Edition, published by the Ordnance Survey in the 1940s, and are great for tracing rivers and rural roads.
It’s only visible at zoom level 14, so you’ll need to zoom in/out until you’re at the right level – hover over the ‘Edit’ tab and look at the URL to find which level you’re in. (Eventually, I hope to add overview scales lower than 14.)
Birmingham and the Chilterns are also on there, by request. If you’d like to request an England and Wales sheet to be added sooner rather than later, please add it to the wiki page.
A few tips:
- When tracing from an NPE (or any other) background, you can drag the background while holding Space to realign it. Try to align a GPS-derived road with the corresponding feature in the background.
- With NPE, bear in mind that the layer is compiled from many individual map sheets, and the misalignment will vary from sheet to sheet – so try to align it with a feature on the current sheet. Realign often!
- Most of the roads in a rural area will be in the same place 50 years ago, but classifications often change, particularly in very remote areas. Many of the “tracks” on the Wales sheets are now proper tarmaced roads.
- It’s good practice to add a “source=NPE” tag to indicate where you traced the road from.
Misaligned tiles
Occasionally you’ll find a tile that’s clearly in the wrong place. As I write, that’s true of a bit on the coast near Criccieth, and a whole chunk around South-East Wales and the Wye Valley. This is usually the result of me accidentally missing out an anchor point when “rectifying” the scans. If you find a mistake like this, please add it to the wiki page.
Filed under: news
I’m delighted to say Potlatch v0.8 is now live.
Relations support
Thanks to Dave Stubbs, Potlatch now has really good support for relations. This means you can easily create long-distance routes, holes in areas, and other as-yet-undecided uses.
Relations have of course existed in OSM for several months, but I’ve held off adding support into Potlatch until we could get the UI right, and I think Dave’s work does exactly that.
Any relations that a way(/point/POI) belongs to will show up in the tags panel, with the rest of your tags. Relations are also marked on the map with an extra colour band. Clever bit: if you move your pointer over the relation, Potlatch will highlight all the other members!
To edit a relation, just click on it, and you’ll get a pop-up tag editing panel.
To add a way/whatever to a relation, use the new little “link” icon on the right, then select a nearby relation from the menu (or “Create a new relation”).
And to change the way’s ‘role’ in a relation, just type it into the little text box within the relation, on the tag panel.
There’s a couple of refinements to come for future versions, but this, I think, is a really great start.
Improved tag editing
In conjunction with the above, I’ve rewritten a lot of Potlatch’s tag editing code. Changes include:
- You can now use colons in keys
- Tag panel resizes with the window
- Very subtle scrollbar when there’s too many tags to fit (possibly too subtle :) )
- Explicit ‘delete’ (X) button for each tag
- Various bugs removed (e.g. clicking autocomplete on freeform fields)
There are many changes under the hood so a few new bugs have been introduced; there’ll be a 0.8a in a couple of days, but as ever, let me know of any via trac, the wiki or mail.
Out-of-copyright layer
There’s now an out-of-copyright background layer available.
It doesn’t really have any maps in it though. :) Thus far there are a few tiles of Anglesey and the Chester area at zoom level 14 only. I’ll be adding the rest of Wales soon and then starting on England. If there’s anywhere in England you have a burning need for, please add your requests to the wiki.
The layer is deliberately called “out-of-copyright” rather than “New Popular Edition”, because it would be good to get other o-o-c maps on there too. If you have out-of-copyright maps, and some knowledge of Perl and projections, let me know and we can discuss adding them.
Filed under: tips
You can choose from several different background layers using the preferences/options window (the tick icon). But if you’d like to quickly switch between them, you can also use the function keys. The keys are in the same order as the menu, so:
f1: none
f2: OpenAerialMap
f3: Yahoo
f4: Mapnik
f5: Osmarender
f6: Maplint (errors)
f7: cycle map
f8: out-of-copyright map (as of Potlatch 0.8)
If you hold down Shift while pressing any of these keys, it will dim the layer (show it at just 50%), so that ways and points stand out more clearly.
Remember that Potlatch will automatically hide the Yahoo layer in the event that there’s no imagery for the zoom level you’re at. In that case, switching to OpenAerialMap will give you magnified aerial imagery (Landsat).
Filed under: development
I’ll occasionally post a few tales from the development of Potlatch for those of a more technical inclination.
Potlatch makes very heavy use of Flash’s built-in events. Some of these are fairly simple mouse events. Each MovieClip (a “sprite”), for example, has events including onPress, onRelease, onRollOver and onRollOut. Potlatch uses these to tell when you’ve clicked on a way, or dragged the map, or clicked a button.
Fine so far.
Flash also has really useful events for textfields. Potlatch uses onSetFocus, onKillFocus and onChanged. So, when you’re typing a tag name or value, every keypress triggers an onChanged event; when you click in the value, that triggers an onSetFocus – and possibly an onKillFocus for the textfield you were in before.
The tricky bit is that sometimes these events don’t fire in quite the order you expect.
Take the blue autocomplete menus. If you select an item in one of these, Flash fires an onPress event for the menu, just as you’d expect. But it also fires onKillFocus for the textfield that you’re editing – and it does that before the onPress event.
The result is that Potlatch sees that the textfield has lost focus; looks in the textfield; probably sees it’s empty; and thinks “oh, the user is leaving the textfield with the value empty, that means they want to delete the tag”… and deletes the tag. So when onPress fires immediately afterwards, there’s no tag any more to put its autocomplete value in.
This is the sort of thing that is really, really horrid to debug, trying to work out which order things are firing in. I eventually fixed it by adding a new onMouseDown event for the whole of Potlatch, which simply notes a mouse-click – and this, happily, fires before both onKillFocus and onPress. So the onKillFocus event now checks for this; if it figures “yes, the user has just clicked the mouse”, and the mouse is currently over the autocomplete menu, it just returns without doing anything.
(This fix is one of the new things in 0.8!)
Another case. When you press “+”, Potlatch adds a new blank tag, and helpfully selects the ‘key’ field for you. Except if Flash had its way, it would then promptly populate the key field with the string “+”. I figured “+highway=trunk” is probably not a useful OSM tag, so there’s now a couple of lines of code to say “if it looks like the user has changed the key to +, they probably don’t mean it”.
So apologies if your super-duper private tagging scheme uses + as a key, because Potlatch won’t let you enter it.
Incidentally, there’s some relevance here to the is-the-iPhone-getting-Flash-or-not discussion. Performance? Not a problem – AVM2 is reputedly pretty fast on ARM, and hey, it works on the much less powerful Chumby. Choking the iPhone? I don’t think so – Safari on Mac already restricts Flash CPU time if it’s not frontmost anyway. Politics? Yes, almost certainly. But the big development problem as I see it is that events like onMouseUp don’t easily translate to iPhone touch events, and a lot of Flash apps are built entirely around these events. I’ll be really interested to see how Adobe gets around this.
Filed under: tips
One of the quickest ways to speed up your Potlatch editing is to turn off the ‘custom pointers’ – the little pen and hand pointers.These provide useful feedback as to what clicking on a given spot will do, but if you’re an experienced Potlatch user, you probably don’t need the help.
To turn off the pointers, just click the options window (the ‘tick’ icon) and uncheck ‘Use pen and hand pointers’. From then on, you’ll just have Flash’s standard arrow and finger pointers.
Potlatch remembers your preference, so you don’t need to do this every time you open it.
Filed under: Uncategorized
Potlatch isĀ OpenStreetMap’s online map editor, and this blog is here to help you get the most from it.It’ll bring you news of the latest releases, and what’s changed; tips on using Potlatch efficiently; and comments about the code and development that underlies it.And if there’s anything you’d like to see explained in a future post, then just leave a comment.