Archive for the ‘Location’ Category

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: APIs, Location, Social

Facebook Opens Up Places in its API

Less than a full day after launching its new location-sharing feature, Facebook has opened up Places to developers.

Thursday afternoon, developers gained access to users’ check-in data via Facebook’s Graph API. Developers can also access check-in data from locations, like restaurants and businesses, to see who’s checked in there.

As we mentioned in our coverage of Wednesday evening’s launch, the Places data is read only for now. Applications can’t write or search Places data through the API. Those features are only available to Facebook’s launch partners for Places — Gowalla, Foursquare, Yelp and Booyah — while the kinks get ironed out. Everyone will get access to write and search Places data within a few months, according to Facebook.

The documentation for the Graph API has been updated to provide instructions for calling Places.

So sayeth the man page: “Every check-in is associated with a check-in ID that represents an object in the graph. Check-ins are associated with locations represented by Facebook Pages; the location must have a Facebook Page ID, whether the Page was created on Facebook directly or using the Open Graph protocol.”

If you don’t want to join in any of Facebook’s check-in reindeer games, the How-To Wiki has instructions on disabling Places in your account.

See Also:

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, Social

‘Places’ Turns Facebook Into a Location Sharing Powerhouse

Facebook has jumped on the location check-in bandwagon with a new feature known as Places. Facebook Places has launched with four partners, all services that already offer check-in services — Foursquare, Gowalla, Yelp and Booyah.

If you use Foursquare, Brightkite or other location check-in services there isn’t much to see in Facebook Places. The only real difference is the scale that Facebook brings to the table.

Places is already available to most in the U.S. in their desktop browsers on Thursday. To use Places on your mobile, you’ll either need to download the new Facebook iPhone app (version 3.2, which is available now), or you can head to the Facebook mobile site with a web browser that supports the Geolocation API (basically anything but IE).

To read full coverage of the Places launch announcement on Wednesday night, read Ryan Singel’s report on Wired’s Epicenter blog.

While Facebook isn’t doing much with location that hasn’t already been done at least half a dozen other services, it does of course bring location sharing to Facebook’s massive user base of 500 million people around the world. Eventually, all of them will get access to Places once it rolls out in other countries. In the past that user base hasn’t been very welcoming of new features, especially features that involve privacy changes. While Places will be activated for all accounts, by default your location won’t be broadcast to everyone — just your friends.

To use the new feature, you can actively check in to a location, or you can let your friends check you in to a location without doing anything. While this may ruffle your feathers, if you don’t want people knowing where you are, it’s pretty simple to disable your friends’ ability to check you in, and to just ignore the check-in button.

According to Facebook CEO Mark Zuckerberg, Places has three goals: helping people share where they are, seeing which of your friends are close by, and seeing what other places of interest are near you.

Continue Reading “‘Places’ Turns Facebook Into a Location Sharing Powerhouse” »

File Under: Location, Web Apps

Microsoft Adds OpenStreetMap Layer to Bing Maps

You can now turn on a special layer in Bing Maps that displays maps from OpenStreetMap, Microsoft has announced.

OpenStreetMap is an open source mapping project that keeps an editable map of the entire globe. Anyone can make edits to the map — it’s been nicknamed the “Wikipedia of maps.” The open source model has proven especially effective in regions of the developing world where very little solid map data exists, and in areas where highly detailed, editable maps are critical for natural-disaster response efforts, like the recent Haiti earthquake.

Microsoft’s adoption of the open source mapping project follows a similar move by MapQuest, which began adding OSM layers last month.

To run layers in Bing Maps, you’ll need the latest version of Microsoft Silverlight and a supported browser. It doesn’t work properly in Google Chrome (at least on the Mac), but IE8, Firefox and Safari had no problems. If you’re using the Ajax controls to view Bing Maps (instead of Silverlight), then you won’t be able to see the OpenStreetMaps layer, but Microsoft says this is something that may make its way into the non-Silverlight version eventually.

Use the map view switcher at the bottom to change layers.

To add OpenStreetMaps to your Bing, go to the App Gallery. Look for the new OpenStreetMaps app in the gallery. Click on it, and your alternative OpenStreetMaps view should launch within Bing Maps.

You can switch back to any of the other standard views in Bing Maps by clicking on the layer control at the bottom of the map window. You’ll notice Bing Maps is using the Mapnik build of OpenStreetMaps for its map layer. You can switch back and forth between the OSM layer and any of the other standard Bing maps layers using the same control.

Microsoft has been quickly adding some innovative features to Bing, especially on its Maps website. In June, Bing Maps added the ability to browse parts of the world in 3-D, and in February it demonstrated indoor panorama views and location-specific videos that are accessible within Bing’s street-side imagery.

Microsoft also ran its King of Bing maps challenge for developers last month, asking them to create innovative apps for the mapping platform. For the contest, a developer named Ricky Brundritt built an app for Bing Maps that estimates your taxi fare within most major U.S. cities.

However, Bing’s reliance on Microsoft’s proprietary Silverlight technology to power these innovations is seen by some as an alienating factor — and an unnecessary one at that, since other mapping platforms like Google Maps accomplish much of the same functionality using JavaScript and other web standards. This is especially important on mobile devices, where the most popular browsers don’t allow for plug-ins like SIlverlight.

Still, it’s heartening to see Bing adding to the momentum OpenStreetMaps is currently enjoying. Anyone can edit the OSM maps, and now that the project is getting some attention — thanks mostly to its efforts in Haiti — edits are coming in more quickly.

According to the latest stats, the project has over a quarter of a million participants and over 1.8 billion uploaded GPS points. Dedicated users are getting creative and finding ways to add even more detail to the existing maps by doing offbeat things like tagging wheelchair ramps, mailboxes and trees in their neighborhoods.

Taxi Fare Calculator link courtesy Mashable

See Also: