Archive for the google maps Category

On one of our platforms that uses the geocoding services from the google maps api v2 (using client side javascript) we fell upon a very very weird bug.

For the same city google gives different answers based upon the presence of accents in the query string.

1. When you look for Angoulême (the correct spelling, see the small hat upon the e? called accent circonflexe or by it’s html entity name ê) Google’s geocoding api gives the incorrect answer of angouleme without the accent.
2. When you look for Angouleme (without the accent) it gives the same incorrect answer angouleme.
3. But when you look for Angoulème (incorrect spelling with an ‘accent grave’) it outputs the correct answer angoulême !!!

You can test by using the following urls:
angouleme
http://maps.google.fr/maps/geo?hl=fr&oe=utf-8&q=angouleme%2CFR&key=REPLACE BY A VALID GOOGLE API KEY
angoulême
http://maps.google.fr/maps/geo?hl=fr&oe=utf-8&q=angoul%C3%AAme%2CFR&key=REPLACE BY A VALID GOOGLE API KEY
angoulème
http://maps.google.fr/maps/geo?hl=fr&oe=utf-8&q=angoul%C3%A8me%2CFR&key=REPLACE BY A VALID GOOGLE API KEY

The answers are extracted from the json section that looks like this: “SubAdministrativeArea”:{”SubAdministrativeAreaName”:”Charente”,”Locality”:{”LocalityName”:”Angoulême”}}

The same problems appears for other place names with accents but has not been thoroughly tested.

Click to continue reading

Our good and extremly competent friends at Bearstech saw my post about Geo encoding (Retrouver par code postal tous les lieux qui sont du même dépratement, de la même région ou de la même ville (mysql, php)) of French data and decided, this was no way to go around this! So Vincent Caron decided to create for all those interested a great GPLed package to help you will all your geocoding woes for France! so go over to the Bearstech forge (http://forge.bearstech.com/) where you can download the package or browse the php source code through the trac SVN interface.

Geo-Data (France) ¶
Features ¶

This is a compilation of simple administrative and geographic informations for France, up to the city and district level:

* 32,856 cities with their official zipcode and préfecture flag. Paris, Lyon and Marseille are split into arrondissements.
* 96 départements, 6 DOM and 3 TOM (within the same hierarchical level). Proper keying is used (ie. 2A for Corse du Sud, no “20″ or “97″ shortcuts).
* 22 régions, with two supplementary to classify départements from DOM and TOM.

Redundant data in all tables help make you sure you can all information available in a single SELECT lookup:

* asking for a département gives its région
* asking for a city also gives its corresponding département and région

Note: the city database might be incomplete, our source was not properly time stamped.
History ¶

This compilation of PHP and SQL code was extracted from a production real-estate web site, which uses extensively this geographical data to search, filter and match people wishes with other’s desires.

The data was collected from various public french sources and meticulously, patiently reworked and modified by Bearstech according to professionnals and users feedback while using the data.
Copyright ¶

Click to continue reading

For the benefit of those who participated in the Google developers day presentation a French only post.

Dans ce billet vous trouverez les sources et les présentation de la session Google Maps lors du Google Developers Day à Paris du 31 mai 2007 . Dans le poste du 25 mai vous pouvez trouver le code pour travailler avec les adresses françaisesSuivez ce lien pour la présentation de Clément Hallet sur les bases d’utilisation de Google Maps API et celui ci pour la présentation sur des thèmes plus avancés (géocodage côté serveur, chargement asynchrone des marquers et calcul des distances).

Ici vous pouvez télécharger le code d’exemple utilisé dans la présentation Google Maps API - Basics. Notez que la clé utilisée (ABQIAAAAyzlxpGWavaTREVb4HcYiUhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSYK1OvuhDXV84EQwe2sBFw6vUHtg) marchera sur http://localhost - adaptez la à vos besoins, pour générer votre propre clé Google Maps API cliquez ici (vous pouvez consulter mon billet sur la gestion de configuration par virtual host pour résoudre le problème des clés google utilisé conjointement avec mod_proxy et PHP ).

Click to continue reading

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.0 License.