The increasing availability of location-acquisition technologies (GPS, GSM networks, etc.) enables people to log the location histories with spatio-temporal data. Such real-world location histories imply to some extent users’ interests in places, and bring us opportunities to understand the correlation between users and locations. In this article, we move towards this direction, and report on a personalized friend & location recommender for the geographical information systems (GIS) on the Web. First, in this recommender system a particular individual’s visits to a geospatial region in the real world are used as their implicit ratings on that region. Second, we measure the similarity between users in terms of their location histories, and recommend each user a group of potential friends in a GIS community. Third, we estimate an individual’s interests in a set of unvisited regions by involving his/her location history and those of other users. Some unvisited locations that might match their tastes can be recommended to the individual. A framework, referred to as a hierarchical-graph-based similarity measurement (HGSM), is proposed to uniformly model each individual’s location history, and effectively measure the similarity among users. In this framework, we take into account three factors: 1) the sequence property of people’s outdoor movements, 2) the visited popularity of a geospatial region and 3) the hierarchical property of geographic spaces. Further, we incorporated a content-based method into a user-based collaborative filtering algorithm, which uses HGSM as the user similarity measure, to estimate the rating of a user on an item. We evaluated this recommender system based on the GPS data collected by 75 subjects over a period of 1 year in the real world. As a result, HGSM outperforms related similarity measures, comprising of similarity-by-count, the cosine similarity and Pearson similarity measures. Moreover, beyond the item-based CF method and random recommendations, our system provides users with more attractive locations and better user experiences of recommendation.