All posts tagged ‘maps’

File Under: Databases, Web Services

OpenStreetBlock Gives Geodata the Human Touch

Location-based web services are all the rage right now, but for most of us the actual geographic location isn’t very interesting — do you know where “40.737813,-73.997887″ is off the top of your head? No? How about “West 14th Street bet. 6th Ave. and 7th Ave?”

For the geographic web to become useful geodata has to be converted into something humans actually understand. Enter OpenStreetBlock.

OpenStreetBlock is a new web service that takes geographic coordinates (latitude/longitude pairs) and turns them into an actual city block description. The result is textual information which, in many cases, will be even more meaningful to your users than the ubiquitous pin on a map.

If you’d like to play around with a sampling of data from New York, head over to OpenStreetBlock and try out the New York demos.

If you’ve ever wanted to build your own version of EveryBlock — which pinpoints events, news stories and public data at the city-block level — OpenStreetBlock will go a long way toward getting you there. So long as you can pull geo coordinates out of your source data, OpenStreetBlock can turn that into more meaningful information.

Under the hood OpenStreetBlock relies on OpenStreetMap data and uses PHP in conjunction with a geographic database to turn your coordinates into block descriptions.

As cool as OpenStreetBlock is, getting it up and running on your own site will require a bit of work. Luckily, there are some good tutorials available that will walk you through the process of installing and setting up many of the prerequisites like PostgreSQL and PostGIS (I’ll assume you already have an Apache server with PHP installed).

To get started with OpenStreetBlock, grab the code from GitHub. The next thing you’ll need is a PostgreSQL database with all the PostGIS tools installed. Luckily those are also prerequisites for GeoDjango, so head over to the GeoDjango installation page, skip the Django-specific parts and just follow the Postgres and PostGIS installation instructions.

Next you’ll need to download Osmosis and Osm2pgsql to convert OpenStreetMap data into something Postgres can handle. Head over to OpenStreetMap, zoom into an area you’d like to query with OpenStreetBlock and then choose “export.” Select the OpenStreetMap XML Data option and save the file.

From there you can check out the guide to importing the OpenStreetMap XML Data in the OpenStreetBlock read me.

See Also:

File Under: Location, Web Services

Personalize Your Map With a Custom Map Marker

If you’re adding a map to your website, why settle for the vanilla design when you can customize it and leave your own personal mark?

This tutorial will show you how to create a custom map from scratch, then add a little unique flavor to it by replacing the standard “map pin” icon with a custom icon of your own design.

To do this, we’ll be using Mapstraction, a library that creates map code that can be reused across all the big mapping providers (Yahoo, Google, et al). Mapstraction also allows for multiple types of customization such as custom info bubbles and graphics like the one we’ll be dropping onto the map.

Note: This tutorial is adapted from the book Map Scripting 101 by Adam DuVander. Adam is a former Webmonkey contributor and executive editor of Programmable Web. In his book, he shows how to use all of the features of the most popular mapping APIs, and how to mash them up with data from other sources like events calendars, weather services and restaurant review sites to make a variety of custom maps.

This exercise comes from chapters 1 and 2 of Adam’s book, and it is reprinted here with his permission and that of the book’s publisher, No Starch Press. It isn’t a word-for-word excerpt. It has been slightly adapted to work as a web tutorial. You’ll find dozens of in-depth exercises — including the full version of this one — in the book itself.

Create a Mapstraction map

Mapstraction is a little different from Google Maps and Yahoo Maps. Mapstraction is an open source JavaScript library that ties into other mapping APIs. If you use Mapstraction, you can switch from one type of map to another with very little work, as opposed to rewriting your code completely.

Using Mapstraction limits your risk to changes being made to an API. For example, if your site’s traffic takes you beyond the limit for your chosen provider, or the provider begins placing ads on the map, Mapstraction lets you switch providers quickly and inexpensively.

To use Mapstraction, you must first choose a provider. In this example, I’m using Mapstraction to create a Google Map.
Continue Reading “Personalize Your Map With a Custom Map Marker” »

File Under: Location, Visual Design

Beautiful Websites: Stamen’s Pretty Maps

We’ve seen some colorful map mashups in the past, like Hypercities and HeatMap, but few are as abstract and beautiful to look at as Stamen Design’s Pretty Maps.

The aptly-named app pulls sets of geodata from various freely available open mapping projects and plots them atop one another. Pretty Maps grabs street-level data from OpenStreetMap (the “Wikipedia of maps”), land formation data from Natural Earth and place-name and place-shape data from Flickr shapefiles — Flickr’s outlines generated by the tags people have attached to photos taken in that place. So all the data is from crowdsourced databases and either public domain or licensed through the Creative Commons. The maps are generated using TileStache and PolyMaps, two open source tools developed in-house at Stamen.

The result is a map that’s not so much usable for navigation as it is pretty to look at. Cities degrade into abstract and unique blobs, with pastel colors overlaying one another. The shapes are alien looking in texture and density, but instantly recognizable if you’re already familiar with the terrain.
Continue Reading “Beautiful Websites: Stamen’s Pretty Maps” »

File Under: Location, Web Services

MapQuest U.K Teams Up With OpenStreetMap

The grandaddy of online mapping sites is turning to an open source library for its cartography data.

Mapquest, which is owned by AOL, launched a new beta site Friday that uses data from OpenStreetMap. So far, the OpenStreetMap data is only available on MapQuest for the United Kingdom and some of continental Europe, but MapQuest says it will broaden the scope of this experiment in the future.

Just to show it’s not messing around, the company has also established a $1 million fund “to support the growth of open-source mapping in the United States.” So, we can expect MapQuest to start hosting U.S. maps from OpenStreetMap at some point.

OpenStreetMap is like a Wikipedia for maps. It’s a fully open source and crowdsourced project. All of the geodata in the OSM system is gathered and entered by volunteers, and all of it is freely available for all to use. Furthermore, if you find an inaccuracy in a map anywhere in the world, you can actually go in and fix it. Here’s what a year’s worth of OSM edits looks like.

There’s a wiki with more information if you want to get involved. We’ve written extensively about the project before — check out some of the links at the bottom of this article.

MapQuest is using OSM for tile images and all cartographic data. It is then applying its own user interface and routing algorithms on top of OpenStreetMaps’ maps.

Here’s what MapQuest’s Antony Pegg has to say about the project on the MapQuest developer blog:

The goal was to create a MapQuest experience for the United Kingdom using only OpenStreetMap data. As much as possible we tried to use the open source software used by the OSM community, so anything we did to these tools could be contributed back. We picked the UK first because we felt we had the best shot of getting use-able routes from the data without having to worry about a language barrier at the same time.

See Also:

File Under: Location

Bing Maps Gets a Developer SDK

Microsoft may be a few lengths back in the race to win the online mapping prize, but you can never count Redmond out. The company released an SDK for Bing Maps on Monday, allowing developers to create their own Map Apps for submission into Bing Map Apps gallery (Silverlight is required for that link).

When Microsoft first launched the Bing Map Apps gallery (say that three times fast) a few months ago, it featured interesting geodata mashups from partners like Foursquare, Twitter, Weather.com and TrafficLand.com. These maps provide one or more data layers over whatever map you’re currently looking at, so you can see things like restaurant reviews, geo-tagged tweets, weather camera images and temperature readings or traffic cams. My favorite is the Urban Graffiti tracker from virtualglobetrotting.com which pinpoints places where you can see some cool street art.

Now, anyone can make one of these apps. With the new SDK, developers can create their own geodata overlays using any data set they can get their hands on, then submit their creations to the Map Apps gallery. Microsoft will feature the best submissions and present them to everyone using the Bing search tool. The company says it will also allow advertising in the Map Apps and split the revenue with the creators. There’s a testing tool included in the launch.

The goal of Monday’s release appears to be two-fold: increase interest in Bing Maps, and speed adoption of Silverlight 4, the latest version of Microsoft’s rich media and streaming video platform, and it’s alternative to Adobe Flash.

Everything built with this SDK needs to be done in Silverlight 4. You’ll also need the Silverlight plug-in to view any of Bing’s mapping features — at least version 3 is required for the bing.com/maps website.

It’s a bit of a shame that Microsoft has so deeply baked Silverlight into the Bing maps experience while others — most notably, Google and OpenStreetMap — have managed to create rich, interactive maps using HTML, JavaScript and CSS. But one can’t blame Microsoft for trying to popularize Silverlight at a time when the web is starting to move away from Flash as the de facto standard for presenting rich content in the browser. Even though most of the momentum is going into HTML5, CSS 3 and other open standards, Silverlight stands a chance to win some ground.

Silverlight is currently installed on around 60-65 percent of internet-enabled PCs. Around half of Silverlight’s users are running version 3, with around seven percent running version 4, according to riastats.com.

See Also: