OpenStreetMap Inspector helps you improve OSM data

The OpenStreetMap contributors at GEOFABRIK have been doing good things for OpenStreetMap for years. One service, called OSM Inspector, highlights potential errors in the OSM database so that OSM contributors can inspect and correct them. The potential errors are presented in several themes including highways, waterways and administrative boundaries. Some of these layers examine OSM data in one area and others serve the entire planet.

New OSM Inspector routing layer

The most recent addition to the GEOFABRIK OpenStreetMap Inspector is a routing layer for the rest of the world. They’ve had a layer that tested routing in Europe for a while, the new part is that these tests are now extended to the rest of the world as well. And the result is an interesting view of some parts of North America.

OSM Inspector shows potential routing problems such as major roads that approach each other within 5m without connecting.

This view from OSM Inspector shows a pattern of duplicate ways in Indiana as blue lines, and a pattern of unconnected ways in Ohio as red dots.

This view of potential errors is very helpful to check and improve the data in your local area. While one could check OSM Inspector in one window with an editor in another window, GEOFABRIK makes it even easier. OSM Inspector can be used as a background layer in OSM editors.

OSM Inspector in JOSM

To use an OSM Inspector layer in JOSM install it as a background imagery layer.

Follow the numbered steps to add OSM Inspector layers to JOSM.

  1. Open the preferences dialogue and select the “WMS/TMS” tab.
  2. Add a new WMS/TMS layer by pressing the “+” button
  3. Add a name for this layer in the Menu Name text box. Perhaps “OSMI routing”.
  4. Add the WMS service URL in the Service URL text box.
  5. Press the “Get Layers” button.
  6. Select the Routing layer from the layer list.
  7. The Imagery URL will be filled in automatically when you select the layer from the list.
  8. Select “OK” to complete adding the new imagery layer.
  9. Select “OK” again, to complete your preference changes.

You should now see “OSMI Routing” as an option in the Imagery menu. If not, restart JOSM.

To use OSM Inspector layers select them from the Imagery menu. Try moving the OSMI Routing layer to the top of the layer stack, and reducing the opacity of the layer so that you can refer to both the OSMI routing layer, and an aerial imagery layer at the same time. Inspect the potential errors highlighted by the OSMI Routing layer and determine if they are, in fact, errors. If so, fix them!

OSM Inspector in Potlatch 2

OSM Inspector can be used as a background layer in Potlatch 2 as well. Use the GEOFABRIK site to find an area near you with potential routing errors. As ever, your contributions to OpenStreetMap are most valuable when you have personal knowledge of the places that you edit. Navigate to that area on and zoom in to a reasonable editing bounding box. Select the edit tab to start Potlatch 2.

  1. Select Background from the Potlatch Menu bar, then press the “Edit” button to add a new background layer.
  2. Press the “add” button at the bottom of the background imagery dialogue box.
  3. Add a suitable name such as “OSMI Routing” to the Name text box.
  4. Add the new URL$z/$x/$y.png
  5. Press “X” to close the background layer dialogue box.
  6. Select the OSMI Routing layer from the Background menu.

You might find that the potential errors highlighted by OSM Inspector are easier to see if you choose another map style. Try selecting “Wireframe” from the Map style menu.

Do you find OSM Inspector helpful?

Do you find OSM Inspector helpful? Many OpenStreetMap contributors do. Have a look some time at the other great services that GEOFABRIK provides to the OpenStreetMap community. I like the history animations, and the country and region planet extracts are very popular as well.

You can help GEOFABRIK to make OSM Inspector service even better through sponsorship. Sponsoring OSM Inspector will allow more frequent updates of the data, additional analyses and wider geographic coverage of the services.


OSM Inspector has little “P” and “J” icons above the map. Clicking those will open Potlatch or JOSM editing windows with the same bounding box as the OSM Inspector window. JOSM must be running already. Be sure to zoom in to a reasonable (small) bounding box size first.

Posted in Basics, Tutorial | Tagged , , , , , , | Comments Off

Mapnik cookie style sheet and tutorial

In the spirit of previous OpenStreetMap tutorials, here are the instructions to make your own awesome OSM tiled map “cake”.

  1. Select your area of interest, scale and tile dimensions
  2. Bake sugar cookie tile bases. Choose your projection carefully. We used Culinary Mercator
  3. Prepare and apply icing
  4. Enjoy

Sugar Cookies

(from )

* 1 1/2 cups unsalted butter, softened
* 2 cups white sugar
* 4 extra large eggs
* 1 teaspoon vanilla extract
* 5 cups all-purpose flour
* 2 teaspoons baking powder
* 1 teaspoon salt

Cream together butter and sugar, beat in eggs and vanilla. Stir in dry ingredients. Chill in refrigerator for one hour.

Preheat oven to 400°F with rack on middle shelf.

Place waxed paper on cutting board. Roll out to between 3/16″ and 1/4″ on waxed paper. Cut to tile dimensions with pizza cutting wheel with 1/2″ gaps between ’tiles’. Remove dough from 1/2″ gaps and reserve for next batch (or for zoom widget). Place silpad on cookies and cookie sheet atop silpad, upside down. Flip cutting board, cookies and all onto cookie sheet. Remove cutting board and waxed paper.

Bake cookies until corners start to brown, about 8 minutes. Remove from oven and cool completely on cooling rack.

Baking square cookies is difficult. This method allows the cookies to grow together in the oven, and still fracture cleanly when placed on the cooling rack. Thinner cookies will brown earlier, grow less, and stay non-square. Geographically imperfect tiles may still be delicious. Please test carefully.

Complete cooking and cooling the map tile bases then prepare the icing.


(modified from

* 1 cup confectioners’ sugar
* 4 teaspoons milk
* 2 teaspoons light corn syrup
* 1/4 teaspoon vanilla extract
* assorted food coloring

Stir together milk and confectioners sugar. Beat in corn syrup and vanilla until smooth. Use one complete icing recipe per colour. Add food colouring drop by drop so that you can repeat, and colour-match if required. The working time for this icing is about 20 minutes. Resist the temptation to thin the icing for longer working time, that results in icing that migrates unexpectedly.

Mapnik 3

Load cookies and icing into Mapnik OSM_cake module.

sudo renderd cookies

Alternate method if Mapnik 3 is unavailable

Apply icing to cookies by paintbrush, or by piping bag. Once set the icing dries hard and the cookies can be safely stacked for delivery or storage. Stack them in order so that they can be unstacked into your map without becoming a puzzle. These map tiles might rotate causing difficulty in reassembly.

Posted in Tutorial | Tagged , , , | Comments Off

OpenStreetMap 7th Birthday

Map(nik) Cake from OpenStreetMap 7th Anniversary celebration in Toronto

Mapnik has a new feature coming in v3 and it will revolutionize how you consume OpenStreetMap data.

For the seventh anniversary of OpenStreetMap, Toronto OpenStreetMap users Meggo and rw__ made a map cake. Breaking from previous cakes, this one was a matrix of cookies, over a metre wide.

Map tiles queued for efficient delivery to a variety of data consumers.

Each map tile, 100mm on a side, is a sugar cookie base, iced in white and blue for land and water. A hard-set icing was used to improve tile cache density; tiles can be stacked.

Rendering the Americas.

Data rendering

Each tile is rendered, on demand. Shown are land icing and water icing, paint brushes and coffee (far left).

OpenLayers Widgets

Zoom widget detail

A zoom widget was added for convenience. OpenLayers is an important tool for maps. Never let anybody tell you that OpenLayers zoom control is half-baked. I assure you that it is fully baked. And delicious.

Customer reviews

Edible map tiles are popular.

Posted in Tutorial | Tagged , , , | Comments Off

OpenStreetMap in multi-modal trip planner study

OpenStreetMap contributor, Ed Hillsman, was the senior research associate on a multi-modal trip planner study. In it the authors implement a multi-modal trip planner using transit feeds, OpenStreetMap data and a variety of Open Source tools. Join me in reading this weighty tome. My quick first glance suggests that it will be well worth reading the full report (118 page PDF).

This is not the first time that OpenStreetMap is used as part of a multi-modal trip planner. One of my favourites is the trip planner in Staffanstorp, Sweden.

multi-modal trip planner in Lund and Staffanstorp, Sweden

The Swedish trip planner, developed by OpenStreetMap contributor Britta Duve-Hansen, shows alternate routes for cycling, walking, transit and car, and even estimates calories burned vs. carbon emitted for the different trips.

Development around transit in OpenStreetMap is moving faster and faster. Which are your favourite OSM transit / trip applications?

Maps © OpenStreetMap and contributors, CC-By-SA

Posted in Review | Tagged , , , , , , , , , , , , , , , | Comments Off

Better maps for Geocachers

Hello Geocachers

Don’t you wish you had a better map for your Garmin, so that you could find some caches after following the best available trails? Why go bushwhacking when you can approach from the other side by a manicured trail? Well if your map sources don’t know about the trail you are out of luck.

You can have better data for your GPSr. Here’s how. Update your GPSr with data from OpenStreetMap new data is available often.

Load OpenStreetMap data on your GPSr

  1. Obtain a pre-made OpenStreetMap of your area in Garmin format
  2. Connect your GPSr and computer with USB cable.
  3. Select USB storage mode
  4. Unzip the file
  5. Save the map .img file on the USB card in the Garmin directory.
  6. Rename the file as gmapsupp.img
  7. Safely disconnect the USB cable and try your new map.

Improve map data for other geocachers

The cool thing about OpenStreetMap is that you can update the map with newer, better data when you go Geocaching. Did you discover a new trail and deposit a new cache there? Add the trail to OpenStreetMap, and then you, and everybody else, can have that trail on your GPSr as well.

Here is a tutorial on how to add a trail to OpenStreetMap. It even uses a trail that I added as an example, and there are some new caches posted in this area now.

Better maps, better caches, more fun!

Posted in Basics, Tutorial | Tagged | Comments Off

OpenStreetMap for GeoCachers

A correspondent on Reddit asked if a trail map could be combined with a geocaching map. The answer is Yes, kinda. This post fills in some of the blanks.

Can the beautiful trail map shown in the reddit thread be added to your geocaching map?

Yes and no.

Or in Reddit terms, tl;dr “yes, but not the way you might think at first.” And this is the tl;dr – Too long; didn’t read.

Bad news first. No, that map is unlikely to be added to your geocaching map because the trail map on that page is beautiful, but more of a “sketch” than a map. There is no scale shown and there may be substantial portions where “artistic merit” is used to show important details about the hike in a way that depart from the reality of a true to scale map. It’s a beautiful and helpful sketch, but very difficult to combine with a general purpose map. It would also be difficult to display on a gps / smart phone as anything other than an image. “geocoding” that map looks hard. Nothing wrong with having that beautiful hiking map on your phone as an image! That would be awesome.

but the good news is “yes”. With a little work, or by looking a bit off the beaten path, you can have much better trail maps for geocaching. “Looking a little bit off the beaten path” is not a problem for geocachers, I presume.

In short, the answer is I talk about OSM often because it is awesome and I’ve been participating in OSM for years. It’s a map built by the collective efforts of volunteers, like wikipedia is an encyclopedia built by the collective efforts of article authors. This means that:
* you can add a missing trail to OpenStreetMap.
* others can see the trail you add and improve the map further.

That’s cool enough and you are probably asking yourself, “O RLY?” Yes. You can add missing trails to OSM for others to see and use and further improve. But what else?

How can I see where there are geocaches along trails that interest me?

Do you know about the beta map? From the beta map you can select OpenStreetMap as a background.

Visit the Beta Map – Then select OpenStreetMap from the layer menu on the left. Have a look at an area that you know very well and trails that you have travelled.

Pretty cool, eh? If somebody has added a trail that interests you to OSM, you can see caches, right on the GC site. If “your” trail isn’t in OSM yet, you can add it yourself for everybody else to enjoy.

“Add a trail to OpenStreetMap? That sounds hard!” Well, yes, kinda. It isn’t quite as easy as falling off a log. But you can add your favourite trail to OpenStreetMap and it should appear on the GC beta map within the next week or so. Does that sound like something that will help other cachers? Does that sound like something that you’ll enjoy? Sure it does. I have a tutorial to help you with adding your first trail to The tutorial is from the middle of a series of OSM tutorials so you’ll need to look at a few other steps first.

  1. Sign up for an OpenStreetMap account. You’ll need to supply an email address.
  2. Download an OpenStreetMap editing program. This one, called JOSM is a java application and should work on any computer as long as you have the java runtime installed. More Java installation details are here.
  3. Have a look at this tutorial to add a local restaurant to OpenStreetMap first. It should help you with setting up your account and familiarizing you with some of the tools in JOSM.
  4. Then have a look at this tutorial to add a trail to OpenStreetMap. This could be exactly what you want to do to make your new hide interesting to other cachers.

I have some other OpenStreetMap tutorials as well, so don’t hesitate to ask about them, or to ask about how to add other things to the map.

And I’ve got some other good stuff for geocachers to know about OpenStreetMap, but this post is too long already.

Posted in Basics, Tutorial | Tagged , , , , , | Comments Off

OpenStreetMap Tutorial JOSM POI

There are several editors for contributing OpenStreetMap data. Some describe JOSM as powerful. Others describe it as opaque or User Unfriendly. The truth is that it is just selective about its friends. Let’s make friends with JOSM.

JOSM Background

JOSM was written in Java and should run on any computer with a Java runtime. Installation instructions cover Linux, MacOSX, *BSD and Windows. There are other installation options but you’ll probably want to install the Tested version of JOSM. A nightly build of JOSM with the latest and greatest features is also available for the bold.

Once installed and launched, JOSM will welcome you with recent JOSM news messages. This will also tell you of updates to the tested version of JOSM and you should upgrade when a new tested version is released.

Select an area to Edit with JOSM

Also shown above is the Download from OpenStreetMap icon. This is where most OSM editing sessions begin. Press the Download from OpenStreetMap icon.

JOSM will present you with another dialogue box.

JOSM download from slippy map dialogue box

There is a lot going on in this dialogue box. For now we’ll concentrate on the fundamentals; download your area of interest.

Click the Slippy Map tab to display the map.
Confirm that the check boxes at the top are OpenStreetMap data (checked) and Raw GPS Data (unchecked). The lower Download as new layer check box should be unchecked.

Zoom in to your area of interest. It should be a relatively small area. Several blocks around the location of your point of interest is best.

Zoom in by rolling the scroll wheel up on your mouse. Zoom out by rolling your scroll wheel down.

You can pan to change the center of your map by grabbing the map and moving it. Grab it by right-click-and-hold. Might seem unusual, depending on software and operating systems that you may have used before. Get used to it; you’ll see it again later. Right-click-and-hold to grab the map and move it.

If you need to move a large amount, consider zooming out first, moving then zooming in. Also notice that zooming is centered on the location of your mouse pointer, so you’ll become very quick at this with practice.

Now that you have zoomed in to the area of interest you’ll have to select the area to download. Right-click and drag to draw a box on the map. This is the bounding box that will be downloaded from the OSM server. You’ll probably want to select a few blocks either side of your point of interest for context. Draw the bounding box, and press the Download button in the lower left to download this area from the OSM server for editing.

When the data is downloaded from the server, JOSM will display a slightly larger area. Cross hatching will be shown outside the area that you downloaded to remind you that you should not edit outside the area that you download from the server. You are shown items outside your bounding box because they are included inside your bounding box.

Now zoom in very close to the area you’ll edit. In this case, I’m zooming in to the corner of Fisher Mills Road and Scott Road, because that’s where Tito’s Pizza belongs.

Select Mode

The left side icon bar shows that the select mode is active. Select mode is confirmed by the arrow icon with a dashed rectangle. You can choose the select mode with the s shortcut key or by clicking the top icon on the left hand icon bar. The east – west road, Fisher Mills Road is selected, it is shown as a white line with arrowheads when selected. When an object is selected in JOSM, the object properties are shown in the properties window left of the map window. You can confirm that you are looking at the correct area by confirming the street names.

In addition to selecting a single object by clicking on it you may select a group of objects by click-dragging a selectbox around them. Don’t do that now though. Press Esc to unselect everything.

Add mode

To add a node, change to Add mode by pressing the a key or clicking on the Draw and Add mode icon on the left menu. Add mode, sometimes known as draw mode, is confirmed by the pointer changing to a crosshair, pr plus sign symbol. Any point added will be added at the middle of the crosshair.

Add a Point of Interest from a Preset

Place the node for Tito’s Pizza on the Northeast corner of Fisher Mills Road and Scott Road. Click once to place a node. If you move the mouse away from the node you will see a line extending, rubberband fashion, to the pointer. Add mode is prepared to draw a line of several nodes. That is a task for another tutorial, for now you want to stop adding. Press s to change back to select mode. The new node will be highlighted in white to indicate that it is selected.

Click in a blank space on the map and you will see your new node change back into a hollow yellow square. Select it again by clicking on it once while in select mode. We’ve not assigned any properties to this node yet, so the properties panel is still blank. Let’s fix that. Time to make this node into Tito’s Pizza.

The Presets Menu

JOSM preset menus, cascading
While the new node is selected, from the Main menu bar select >>Presets >> Travel >> Food + Drinks >> Fast Food. Click Fast Food to open the preset hint window.

JOSM preset hint window for fast food preset
Fill in the values for name Tito’s Pizza and cuisine pizza. I don’t know the opening hours, so I’ll leave that blank then press the Apply preset button to save the information locally.

Now we can see that the node has changed to a burger and drink icon to represent fast food. The properties panel tells us that this node is name=Tito’s Pizza, amenity=fast_food, cuisine=pizza, so all is well.

Upload Data to OpenStreetMap

Press the upload button from the main icon bar to upload your new Point of Interest. JOSM will present you with the upload dialogue box which will list your changes, and ask for a change set comment. Add a helpful change set comment that summarizes what you have done in your editing session, in this case, Added restaurant POI in Cambridge Ontario is suitable.

If you have not uploaded with JOSM before you will be asked for your OpenStreetMap username and password. Your OSM username is the email address with which you registered, not your public screen name. Add that information in the authentication dialogue box and press Authenticate to upload your changes.

Congratulations. You have added a local restaurant to OpenStreetMap.


This tutorial is one of a series of tutorials for OpenStreetMap beginners. Find more tutorials here.

Posted in Basics, Tutorial | Tagged , , , , , , | Comments Off

Improve your Locate Us web page

I don’t want ads on my business map

I don’t blame you. Why would you advertise your competitors on your company web site? You wouldn’t, if you had a choice. And you have a choice. This tutorial shows you how to use OpenStreetMap for your Contact Us web page and eliminate the threat of competitor advertisements on your web page.

A Tale of Two Cafés

A common conversation I have with new OpenStreetMap contributors goes something like this.

How do I put my business in OpenStreetMap?
Did you see the tutorials?
Yes, I did that. But it doesn’t look right. I want my business to be more prominent.
… and more prominent than your competitors?
Yes, please!

Okay. Let’s look at the right way to do this. The question is, How do I control the appearance of my business in OpenStreetMap?

And this article is the answer.

Add your Business to OpenStreetMap

The first and most-important step is to add your business to OpenStreetMap. Place your place on the map. Map your business. Tell us where you are.

The tutorials can help you with this if you haven’t done it already. Also see the OSM wiki section on beginners, the mailing list for beginners, or your local OSM group meetings for possible assistance.

Okay, if you have done this already, chances are that it doesn’t look the way that you want it to look. As an example let’s look at the LinuxCaffe in Toronto. What do we know about the LinuxCaffe?

  • LinuxCaffe is a café in Toronto.
  • LinuxCaffe serve delicious coffee and made-to-order food.
  • LinuxCaffe is a family-owned business.
  • LinuxCaffe hosts local group meetings including the first OSM Mapping Party in North America.

That’s a great résumé for inclusion in OpenStreetMap. Surely if any business deserves to be displayed prominently in OpenStreetMap, LinuxCaffe would be that business.

But no. LinuxCaffe, at Grace Street And Harbord Street is rendered only as a café coffee cup icon, while nearby Sam James Coffee Bar shows an icon and name. Why is that? How can LinuxCaffe get the prominence they deserve?

Data vs. Appearance

Let’s look at the data. Both cafés are tagged correctly in the OpenStreetMap database as;

k:amenity v:cafe

LinuxCaffe is shown as a building outline, while SJCB is a node. Additional information about Wifi at LinuxCaffe is included in the database but is unlikely to play a part in this analysis.

Both cafés are available in search functions;

Sam James Coffee Bar Search Result

LinuxCaffe Search Result

So the two cafés should appear the same, all other things being equal. All other things are not quite equal. We’ll come back to this point.

Automated Cartography

Manual cartography is the old-fashioned way that maps were made by Franquelin and Vespucci. Human cartographer, with ink-stained fingers and covered in eraser crumbs, would place items of importance on the map and adjust or omit other items to fit. Each drawn stroke was carefully considered, for the quill v1.0 had no undo button. The human cartographer took instructions from their sponsor or head of state, and drew the map to those guidelines.

OpenStreetMap uses automated cartography to create the image tiles that we see in web browsers like Firefox. In the case of automated cartography, a rendering program, like Mapnik or Osmarender is instructed by a human cartographer to place objects of importance and omit or adjust others. The principles of geographic generalization are used to select, combine, modify and enhance objects placed on the map. Automated cartography makes it possible to create different maps from the same data set by using different generalizations.

A cartographer still make the rules, but the computer applies them.

In some cases the computer may seem to apply the rules ruthlessly.

Now back to all things being equal.

Comparison of Renderers

The OSM Mapnik style displays cafés with a coffee cup icon and the name of the establishment. But the Mapnik style also chooses to not add objects that collide with previously printed objects. Here, as with the earlier image, we see that SJCB has both name and logo. LinuxCaffe has only the name printed; this time the icon is omitted. Note that the name font differs due to the difference in POI rendering and polygon / building rendering.

The OSM osamrender style accepts some level of object overlapping, but in this case, the icon for LinuxCaffe and part of the icon for Sam James Coffee Bar is overwritten by address information. The name for SJCB is not apparent in this rendering.

Some of the differences between the two renderings above are caused by the choice of tools used to create them, while other differences are cartographic decisions made by the respective (groups of) cartographers. Still other differences are imposed by the cartography rules provided and interpreted by the cartographic generalizations used in the rendering tools. These combine with the aspects of the local data to create… Different results for similar businesses.

This is still frustrating for you though. You just want a nice big logo on the map. We’ll get there.

Avoid temptation

You might be tempted to lie about your coffee shop, and call it something else. Tag it as if it were something that is presented more prominently on the map. We’ve seen above, that different cartographers make different decisions about what to place on a map and how to render them. Let’s look at a very different map.

The OpenCycleMap renders OpenStreetMap data with the interests of cyclists in mind. It displays bike shops, bike parking, cycle lanes and other items of interest to a cyclist with priority. And just as we see that bike shops are not shown on the two earlier maps, we see that cafés are not shown on the OpenCycleMap. Had the proprietor of The Bike Clinic been tempted to describe the enterprise as a café for prominence on the Mapnik and Osmarender layers, The Bike Clinic would have been excluded from OpenCycleMap. The viewers of OpenCycleMap are exactly the demographic that The Bike Clinic would like to attract. Cyclists. That they don’t appear on other general purpose cartography is insignificant in this context.

Map your business accurately. You never know when a specialty ice-cream shop and bowling alley map will be launched and bring new clients right to your door.

I hear you. Get to the point, you say. I understand that there is only so much I can do to control general purpose, automated cartography. Show me how to fix this.

Here we go.

Control your Appearance

We know that we can’t control the presentation of OpenStreetMap data on other maps. And we have already added the business to OpenStreetMap. Now let’s look at a map that we can control. A map on your own web site.

Add your map to your web site

We can add an OSM map to a web page with an embedded iframe, but let’s look at a way to do this with more control. Instead of adding a map to a web page, we’ll add a web page to a map.

We’ll set up a basic web page with some example content. You can add these code fragments to your own web page. You’ll need to understand html and css to continue, or pass this information on to your web site person. Find the sample page here.

First we’ll decide where the map should be centered and what zoom level to use as the default. Visit OpenStreetMap and navigate to the place and zoom level of interest. Pressing the permalink link at the lower left of the map will add latitude, longitude and zoom information to the address bar of your browser. Note those settings for later. For LinuxCaffe and this example, I note the following

lat = 43.66012
lon = -79.417355
zoom = 14

You’ll want to adjust these setting in your web page. Look for the variable assignments near line #36 in my-osm.html. You might choose to change the size of the displayed map by adjusting the css height and width near line #5 in the same file.

When you can view your page in a browser, with the map sized, zoomed and centered to your liking we’ll add a logo to the map. It might look like this.

Add your logo to your map

We’ll add a larger coffee cup image to the map for LinuxCaffe, you might choose a corporate logo or a freely licensed logo like the ones in the following collections.

SJJB Map Icons
Map Icons

Add my-osm.txt and the image to your web page directory. Rename the text file to my-osm.txt. If you have used another image file, adjust the image file name in line #2 of my-osm.txt.

You have it right when you can reload the web page and have a large coffee cup in the middle. That might look like this.

You’ll find that the icon we added gives great prominence to our location, as the icon is presented the same size at every zoom level. That means that as an extreme, we can see the giant coffee cup poised over North America when we view the entire planet.

Add details in a pop up

Now that we have the map as we like it, and an additional icon adding prominence, let’s add some more details with a pop up.

A new example my-osm.txt file contains some extra details. Rename it my-osm.txt, reload the page and click on the coffee cup icon.

The pop up extends beyond the map view in this case. Adjust the map center to keep the pop up on screen. In this case I changed the lat and lon variables, near line #36 in my-osm.html to

lat = 43.666
lon = -79.403

And it looks like this. You might want to frame your map to show another local landmark to add context to your location.

Please note

This is only suitable for very low traffic web sites. If your web site is at all successful, and your visitors request a noticeable number of map tiles from the OpenStreetMap servers, your site risks being blocked using this method. OpenStreetMap resources are supported entirely by donations and volunteers, so OSM can not and will not promise that you can use this tile server at your discretion.

So let’s fix that for your high traffic web site.

The nice folks at MapQuest have started using OpenStreetMap and have welcomed us to use their tile servers. So even moderate traffic web sites, up to 4000 tiles per second, are welcome to use the MapQuest tile servers. They request that you if you expect higher traffic.

This requires two changes to my-osm.txt

Download this modified version of OpenStreetMap.js that is enabled for MapQuest tiles.

First, modify my-osm.txt near line #24 to use the local version of OpenStreetMap.js that you just downloaded.

Second, modify the attribution line, near line #55 to include tile attribution for MapQuest similar to ‘Tiles courtesy of MapQuest, Data CC-By-SA (v2)

Your updated web page will look like this.

Extra credit

Continue to style your pop up with additional elements, perhaps address and telephone?

Resources and Credits

Download all of the example files from this tutorial in one zip file.

LinuxCaffe photo by Behdad Esfahbod is licensed CC-By

You can get help implementing your OpenStreetMap solution from service providers listed on the OSM wiki or contact me for recommendations.

Posted in Basics, Tutorial | Tagged , , , , , | Comments Off

OpenStreetMap Developer tool adds muscle

Newcastle Cruise Night

Nominatim Pre-Indexed is a Game Changer

Nominatim Pre-Indexed is an Iron Fist in a Velvet Glove. NPI is a Crate Motor in your Street Racer. NPI is your unfair advantage. NPI will change the way you think about OpenStreetMap search and the way you provide search for your audience.

Nominatim Pre-Indexed reduces the barrier to entry to running your own OpenStreetMap search. The index is created on large, powerful servers and you have the benefit of running the index on your, more modest, hardware. By this time next year, NPI will be as common as Minutely Mapnik.

Posted in Review | Tagged , , , | Comments Off

Four Steps to an Awesome iPhone App with OpenStreetMap

a mobile device showing OpenStreetMap data.

A mobile device displaying OpenStreetMap data for Dallas Texas.

There are only four steps to take to develop an awesome mobile application with OpenStreetMap.

  1. Understand what OpenStreetMap offers. OpenStreetMap offers geographic data under an open license. The OpenStreetMap crowd-sourced geo data is often better than commercial geo data in terms of recency, completeness, breadth and depth of detail. It is also available for use in your application even if your application is commercial. You can use OpenStreetMap data to create your own maps and provide them to users of your application. You’ll find detailed instructions on how to provide these resources for your users in future articles, and from the OpenStreetMap community. You can build your own Tile Server, API server and search and routing tools using OpenStreetMap data and the OSM stack.
  2. Understand what OpenStreetMap does not offer. OpenStreetMap does not offer server resources for your mobile application, or for users of your mobile application. OpenStreetMap is operated entirely by volunteers and supported entirely by donations. Users of your application are not permitted to consume resources funded by OpenStreetMap donors. You must provide the resources yourself, or purchase those resources from a third-party provider.
  3. Understand your obligations. If you make use of the data provided by OpenStreetMap you must give credit to OpenStreetMap and to the OpenStreetMap license. Typically this credit is shown wherever the OpenStreetMap geographic data is shown. You have no permission to use OpenStreetMap data other than the permission granted by the OpenStreetMap license. That license requires that you credit OpenStreetMap and the license in a prominent place.
  4. Develop your awesome mobile application. Now that you know how to use OpenStreetMap data responsibly, go ahead and develop your awesome application! OpenStreetMap does provide resources for responsible developers including a helpful community.

Map © and contributors CC-By-SA

Posted in Basics, Mobile Applications | Tagged , , , , , , , , | Comments Off