Hi,

I had a request to get geocoding for Germany working. The gmap_location module allows to do this. Unfortunately, the current front end is too clumsy for our users (the address you need to fill in to feed the javascript code gets the coordinates from google maps - cool. the address itself however isn't stored in the database.)

I got it working by hacking the location.de.inc. However, I never really learned PHP nor do I know the Drupal API well enough. So, I did it the hard way through copy and paste and spending hours at php.net and other support sites. The following is more a proof of concept. Hopefully someone can base some real code on the raw idea.

I put the whole thing into the location_get_postalcode_data_de function since this was the function I could get working.

For reference: The classes GoogleGeoRequest and xml2array are taken from http://www.moflus.com/test/geotest.php

CommentFileSizeAuthor
location.de.inc9.7 KBmarkusH

Comments

bdragon’s picture

Component: Code » Data update

Changing component to Data update.

bdragon’s picture

Status: Active » Fixed

It looks like Germany is supported by the generic google geocoder these days.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.