Archive: Google Maps

Page 1 of 2 1 2

May 3, 2008

Update the hacker map

hackermap_20080503.jpg

When I created the "Hackers in Your Neighborhood" map last December, I wasn't sure what the response would be. I was really happy to see it end up being really positive, with lots of hackers and organizations adding their marker to the map.

I was just peeking in on its progress today and it looks like it's still alive with minimal vandalization and with lots of individuals and user groups making it to the list.

Some of the momentum has died down a bit, though, so now seems like a good time to do a little spring cleaning. Update your own record, if necessary, and make sure you list or update any hacker-friendly clubs or organizations that you know about. My hope is that this will make it easier for people to network and discover groups near them that they can participate in.

The same instructions still apply: Click the link to connect to the map, log in to your Google account, and you'll find an "Edit" button on the left. Clicking this will put the map in edit mode, where you can drag a new marker onto the map for yourself. Then just toss your name into the title and put your interests and project websites in the description field. If you're already on them map, select the marker you want to edit (try not to screw up others) and then update the text field.

For your personal icons, don't put it right on your address unless you really don't mind giving that info out. Centered on your city, town or neighborhood works fine too.

Some big goals for this round:

  • A club listed in every metropolitan area of the U.S. (red icon)
  • More resources for places to buy related parts or electronics ($ icon)
  • Coffee shops with free WiFi where fellow hackers are typically found (coffee icon)
  • Better representation in South America,
    Africa, Eastern Europe, Asia, and Australia

Big shout outs go to the Philly Linux User's Group, which is the most recent addition to the map, the Twin Cities Robotics Club, who are doing a fine job representing my home base, and Raj, our sole hacker in all of India.

It goes without saying, but when you're done updating the map, try and track down an organization or a few interested folks in your area. You have your assignment. Now get out there and go put some brains together.

The Hackers in Your Neighborhood: Collaborative Hacker Map

Posted by Jason Striegel | May 3, 2008 08:45 PM
Google Maps, Life | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

April 26, 2008

iPhone LoJack - location tracking for your iPhone

Erica Sadun put together a great tool for iPhone users who'd like to keep tabs on their iPhone's location. Instead of GPS tracking, a small binary called 'findme' is used to geolocate the device based on nearby cell towers.

Combined with a simple curl shell script, a private Twitter account, and a scheduled launch daemon, your iPhone can then report its location at regular intervals, which you (or anyone you authorize) can follow using Twitter and Google Maps. You could use this to find your phone if it's lost or stolen, or you might just use it to give your friends and family a way to track your current location.

iPhone LoJack

Related posts:
Command Line Twitter
Open GPS Tracker

Posted by Jason Striegel | Apr 26, 2008 08:21 PM
Google Maps, Life, Mapping, iPhone | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

April 24, 2008

Open GPS Tracker

gpstracker_20080424.jpg

Now this looks like fun:

The Open GPS Tracker is a small device which plugs into a $20 prepaid mobile phone to make a GPS tracker. The Tracker responds to text message commands, detects motion, and sends you its exact position, ready for Google Maps or your mapping software. The Tracker firmware is open source and user-customizable.

From the looks of things, the total cost to build a remote-operated GPS tracking unit is on the order of $100. The design uses a prepaid cell phone to receive commands and report its position via SMS.

I'm sure there are a number of boring nefarious application for this that will freak out a lot of folks, but just think about the more interesting possibilities. You could add this to a weather balloon or autonomous flying vehicle easily track it down if there were any flight problems. A bunch of people in any city could put these in their cars on a short time delay and automatically report traffic flow conditions. You could even roll your own "lo-jack" system that would let you find your car if it was stolen, only with this your car's location is only being reported to you instead of a monitoring station, actually increasing your privacy.

Open GPS Tracker

Posted by Jason Striegel | Apr 24, 2008 08:38 PM
Electronics, Google Maps, Mobile Phones, Transportation | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

April 7, 2008

Javascript marker clustering for Google Maps

gmapcluster_20080407.jpg

Everyone who works with large data sets in Google Maps has come across the problem of displaying a bunch of markers in a small area. Not just an eyesore, displaying anything more than a hundred marker icons at a time can bog the browser down on a lot of platforms, Safari on PPC Macs delivering the most pain.

The solution is to cluster nearby markers into an aggregate marker when there are too many markers being displayed, or when markers are so close at a particular zoom level that they completely overlap. For extremely large datasets this is most efficiently done on the back-end, with successive AJAX calls refreshing the marker set from a PHP script that filters out the visible markers from the set.

You can also handle the clustering on the client side, using javascript to scan the entire set of locations and dynamically determine what's visible and what should be clustered. The downside is that you have to download the entire set and store it in the browser's memory, but unless you start getting well into tens of thousands of markers this isn't a big deal. The benefit to the client side method is that it's less complex, it lets you work around large result sets from back-end APIs that you can't control, and with ACME Labs' Clusterer javascript library it's extremely easy to code.

To use Clusterer, first download and include the Clusterer2.js file from the link below in your maps page. Then you need to instantiate a Clusterer object, passing your map object to its constructor:

var clusterManager = new Clusterer(map);

From there, you use it in place of the traditional MarkerManager or any addOverlay calls by calling the Clusterer's addMarker method. It takes two parameters, the marker to add, and a text string that will be listed in the cluster's contents when it is clicked:

clusterManager.AddMarker(marker, "Marker Description");

The cluster manager will take care of all the dirty work, only displaying items when they are within your view, and dynamically clustering them appropriately when there are too many on the screen at once. When one of the clusters is clicked, it will display a list of the locations inside of it. Most of what you'd want to tweak, like the threshold at which to start clustering and the icon used for representing a cluster, are all adjustable through the API via some self-explanatory methods such as SetMaxVisibleMarkers(n) and SetIcon(icon). Follow the link below for more information, or read the source for a few of the less-documented options.

Clusterer documentation
Clusterer source

Posted by Jason Striegel | Apr 7, 2008 09:56 PM
Google Maps, Software Engineering | Permalink | Comments (2) | TrackBack | Digg It | Tag w/del.icio.us

March 10, 2008

SketchUp has a Ruby API

gsruby_20080310.jpg

I guess it's been available for a few months, but I just noticed that there's a Ruby API for Google SketchUp. Looks like a cool tool for extending the building interface, integrating SketchUp entities with external software, and building procedural stuff, like making terrain or stairs.

Here's a video of SketchUp developer Mark Limber talking about some of the possible ways to extend the software with the Ruby API.

Google SketchUp Ruby API - Link
SketchUp API Blog - Link

Posted by Jason Striegel | Mar 10, 2008 07:05 PM
Google, Google Earth, Google Maps, Software Engineering | Permalink | Comments (2) | TrackBack | Digg It | Tag w/del.icio.us

March 2, 2008

Point polygon intersection in SQL

pointpoly_20080302.jpg

update: As readers noted, it's not the 0 degrees longitude that's the problem, it's at 180 degrees where you could encounter issues. I've also escaped the gt and lt symbols. Sorry about that.

I spent the weekend participating in the F1 Website Challenge, a coding marathon in which competing teams each produce a mythical man-month's worth of web site for a worthy non-profit organization—all in the space of 24 hours.

One of the challenges my team faced during development was finding an efficient way for detecting a particular service region for a given address. Our client, Metro Meals on Wheels, has a number of different regions in which they deliver meals, with each region being served by a particular Meals on Wheels organization. These regions are defined by non-overlapping complex polygons. It's not as simple as a normal vendor search, where you return the nearest location to the requested address. Instead you need to search a database of polygons to find the particular one which intersects the address location.

One of my teammates, Mark Seemann, ended up providing a fairly elegant solution to the problem, and was able to implement it in a simple SQL query. To find out if a point intersects a polygon, it's as simple as drawing a vector from the point and seeing how many line segments of the polygon it crosses. If the number is even, it's outside the polygon. If it's odd, you have an intersection.

So let's say you have a polygon database which has a row for each line segment of a polygon. You can quickly pull all segments that intersect a vector pointing directly east of your geocoded location like this:

SELECT poly_id, segment_id
    FROM segments
    WHERE ( lnga > thelng OR lngb > thelng )
          AND ( (lata > thelat AND latb < thelat )
              OR (latb > thelat AND lata < thelat ) )

That will return you a list of all line segments that you would cross if you walked directly east from the location at [thelat,thelng] (yes, this assumes you don't cross 180 degrees longitude). To determine the polygon (or polygons) that intersect our address, it's as simple as grouping by poly and returning all rows that have an odd number of matches:

SELECT poly_id, COUNT(segment_id) AS segment_count
    FROM segments
    WHERE ( lnga > thelng OR lngb > thelng )
          AND ( (lata > thelat AND latb < thelat )
              OR (latb > thelat AND lata < thelat ) )
          AND segment_count%2 = 1
    GROUP BY poly_id

Of course, the world isn't flat, though I've treated it this way for simplicity. If you wanted this to work for all cases, you'd need to limit your search to a particular distance and translate the coordinates so that the search didn't cross 180 degrees longitude.

Posted by Jason Striegel | Mar 2, 2008 07:15 PM
Google Maps, Mapping, SQL | Permalink | Comments (16) | TrackBack | Digg It | Tag w/del.icio.us

February 18, 2008

Actionscript mapping APIs

flashmap_20080218.jpg

Yahoo recently released an official AS3 API for Yahoo! Maps, which provides another option for Flash-based GIS applications. This adds to Mapquest's official AS3 API and a couple of partially-complete, open source AS2 APIs for Google Maps.

All of these services provide the traditional AJAX APIs, of course, and that's perfect for a lot of uses. By using Flash as the rendering engine, though, there are new options available for the developer. Things like incremental scaling between tile sets, map rotation, and more advanced multi-level vector and raster overlays immediately come to mind.

Yahoo! Maps for ActionScript 3.0 - Link
Google Maps Flash Interface - Link
MapQuest AS3 API - Link
UMap: Google Maps Flash Overlay (flash above above AJAX map) - Link

Posted by Jason Striegel | Feb 18, 2008 07:07 PM
Flash, Google Maps, Mapping, Yahoo! | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

December 1, 2007

The hackers in your neighborhood

gmaps_collabmapping2_200712.jpg

Google recently added a collaboration feature to the "My Maps" area of Google Maps. Similar to the collaborative document editing in Google Docs, when you've made a map you can click the "Collaborate" link and share your map with specific people or the entire world. What's cool is that when you do the latter, you've effectively created a map wiki that anyone can edit, expand upon, and help maintain.

After messing around with the new collaboration feature for a bit, it occurred to me that we should make a map where we hackers can add our own markers and share interests and projects with each other. It might be a good way to network with people around you, and it's also just cool to see what projects people are working on around the world.

gmaps_collabmapping3_200712.jpg

So I went ahead and created the hackers in your neighborhood, an open-access collaborative map that we can use to map the hacker world. Some of my favorite hackers at Make and Craft have added themselves to the map already, but I'd love to see how far we can push this... maybe it'll become too many data points for gmaps to handle.

Just connect to the map, log in to your Google account, and you'll find an "Edit" button on the left. Clicking this will put the map in edit mode, where you can drag a new marker onto the map for yourself. Toss your name into the title and put your interests and project websites in the description field.

If you have a programming or robotics club, toss that in there too and give it a red marker or something.

gmaps_collabmapping_2007120.jpg

I should mention something else about the collaborative feature. As you can see above, it looks like PT from Makezine has tagged my digital hood with some mapfiti.

The one downside of the collaboration feature is that someone might end up vandalizing your work. In reality, though, most of these open-collaborative projects end up working really well just on good faith and community policing. It's why large open source projects work. It's why Wikipedia works. Frankly, I think Phil's Make: tag looks pretty sweet over Minneapolis anyway.

The Hackers in Your Neighborhood - Link

Posted by Jason Striegel | Dec 1, 2007 05:39 PM
Google Maps, Lifehacker, Mapping | Permalink | Comments (4) | TrackBack | Digg It | Tag w/del.icio.us

October 29, 2007

WikiPediaVision

wikivision_20071029.jpg

Here's another fun real-time Google Maps mashup, inspired by flickrvision and twittervision. WikiPediaVision displays recent anonymous edits to WikiPedia, showing you the article being edited, and where on the globe the edit came from. It's a nice way to passively graze interesting topics that someone else just got done thinking about. Why are these simple little maps hacks so addictive?

WikiPediaVision - Link

Posted by Jason Striegel | Oct 29, 2007 09:38 PM
Google Maps | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

October 22, 2007

iPhone OpenStreetMap

iphoneosm_20071022.jpg

If you have a jailbreak'd iPhone, you can update the Maps.app database with tiles from OpenStreetMap. Mikel Maron figured out how to update the Maps sqlite DB and was able to import the street tiles for London.

My first idea was to modify the configuration or constant that the Maps App used for constructing Google Maps tile requests. Andrew helped with decompiling and pointers to other files, but we had no luck as yet. But looking at the app or at the GMM module in a hex editor, there appeared to be SQL inserts of tile pointers .. perhaps Maps was using a database to cache requested tiles. Searching through the filesystem found MapTiles.sqlitedb. That db has just two tables..

This is slick. You still use the built-in Maps interface, but you can add whatever you like to its database. Technically you could alter the database with any map tiles you like. One idea would be to make an alternate database file and fill it with topo-maps. Just swap the file out and you can use the Maps application when you're backpacking.

OpenStreetMap on the iPhone - Link
OpenStreetMap - Link
SQLite Tutorial - Link

Posted by Jason Striegel | Oct 22, 2007 06:47 PM
Google Maps, Mapping, iPhone | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

October 15, 2007

Geotag your videos

geovideo_20071015.jpg

The latest version of Google Earth added a layer for geotagged YouTube videos. So far, it seems like a lot of people are using this feature for documenting landmarks, attractions and live recordings of things like music, sporting events, backpacking trips, urban skateboarding, etc.

If you have a geospatially relevant video that you want to put on the map, it's pretty easy. Just upload your video to YouTube, open the "Date and Map Options" tab in the video information panel, and drag the marker to the correct location. You can zoom in to get a more precise location, or just enter the lat/lon manually with the following format: "geo:lat=yy.yyyy geo:lon=xx.xxxx".

Posted by Jason Striegel | Oct 15, 2007 07:22 PM
Google Maps, Mapping, YouTube | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

August 25, 2007

Bloggable Google Maps

Google Maps added a quick embed feature which lets you quickly add any map to your web site. Prior to this, you needed to have a Google Maps API key, which is fine if you are developing a larger application, but a pain if you just want to make a blog post with embedded directions.

To use the feature, you just click the "Link to this page" link at the top right of any map in the Google Maps interface. There's a quick snippet of 425x350 iframe embed code that you can then copy, or you can choose to customize the layout. The latter lets you select the target size and additionally allows you to tweak the map view to zoom or center on the area of interest.

Embeddable Google Maps - Link

Posted by Jason Striegel | Aug 25, 2007 08:52 PM
Google Maps | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

August 23, 2007

Satellite Alignment Calculator

satfinder_20070823.jpg

Hackszine reader Alan writes:

Anyone who ever installed a satellite dish knows how frustrating it is to point the dish at the satellite somewhere in the sky. I've created a unique tool which calculates the dish angle based on user location and then draws a line on the Google Maps satellite image. You can actually see your house, mark the dish position and then see where to aim the satellite dish.

I've tested it on many installations and the accuracy is amazing, it gets it spot on.

The site is a UK site but the tool works world wide for any satellite and any location. This is a genuinely useful tool for a lot of people.

This is pretty neat. In addition to just drawing a line on the map, you can see how far the satellite is from your location and what the proper elevation angle should be on the dish. This could be useful for determining the nearest or least obstructed satellite for your home.

Google Maps Satellite Alignment Calculator - Link

Posted by Jason Striegel | Aug 23, 2007 08:45 PM
Google Maps | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

August 2, 2007

HOWTO: use latitude and longitude with Google Maps

gmaplatlon_20070802.jpg

Whether you want to quickly add a waypoint to your GPS, or view a map of a known location, it can often be convenient to use real latitude and longitude values with Google Maps instead of dealing with street addresses.

Rerieving a map for a lat/lon value is simple enough with Google Maps. You can simply enter the decimal latitude and longitude into the search form instead of a street address.

However, if you're viewing a map and you want to retrieve the lat/lon location, there unfortunately isn't a convenient "get latitude and longitude" button. Google Maps deals with latitude and longitude locations internally, though, so with this little snippet of javascript, you can easily get the job done:

javascript:void(prompt('',gApplication.getMap().getCenter())

This will return the coordinates of the map's center point. You might want to double-click a position on the map before running the above code. Doing so will reposition that point to the center of the map automatically.

Get Latitude and Longitude values from Google Maps - [via] Link

Posted by Jason Striegel | Aug 2, 2007 07:50 PM
Google Maps, Mapping | Permalink | Comments (7) | TrackBack | Digg It | Tag w/del.icio.us

June 28, 2007

Multi-hop Routes in Google Maps

multidestgmap_20070628_2.jpg

The ability to create multiple-hop routes was recently added to Google Maps. Not only does this let you plan a trip to New York by way of San Francisco and Tampa Florida, but you can also use the feature to adjust a more conventional route. You might do this to manually avoid road construction or traffic jams that you know about.

To use the feature, you simply drag a point on the blue line to another position. The map will automatically compute a new route that crosses through the new position.

You can make use of this functionality from the standard map APIs as well. Before, start and destination addresses were specified by the saddr and daddr parameters:

http://maps.google.com/maps?saddr=start+address&daddr=destination+address

With multiple hops, you just encode all the hops into the destination address, seperated by "to:". For example, "destination1 to:destination2 to:final destination":

http://maps.google.com/maps?
saddr=minneapolis%2C+mn& daddr=san+francisco%2C+ca+
to%3Atampa%2C+fl+
to%3Anew+york%2C+new+york

Link.

Posted by Jason Striegel | Jun 28, 2007 09:26 PM
Google Maps | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

Page 1 of 2 1 2

Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks