Download & Extend

Provide default map links (google) for all countries

Project:Location
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Hi everyone. I've searching for a week but no solution.

When I put an address with a supported map linking, the link appear and you can click in differents providers(as much as you selected in location/map links).

But when I put an address, of my country(Spain) no link is showed.

Any one had this problem?? I guess a lot of people had to fight with the shame problem.

Thank you very much in advanced.

Comments

#1

#2

Title:Map Links for none supported countries» Map Links for none supported countries (like spain)
Status:active» postponed (maintainer needs more info)

nahuelsgk, did the suggestion in #1 work for you?

Another thought, sometimes if a default country has a problem getting geo-coded, the map will not display. Are the locations getting geo-coded?

What if you manually put in lat and long, does the map display then?

#3

Status:postponed (maintainer needs more info)» closed (fixed)

No response in over a month to the request for more information, so closing. Please change the status to active and add more information if this is still a problem for you.

#4

Status:closed (fixed)» active

For India, I have selected Google Maps in Geocoding Options, but still in Map Links it says "none supported". Is India not supported?

#5

I have the same problem. For Belgium, there is also no Map Linking (Not Supported)
What do I have to do?

#6

looking forward to an answer too. Thanks!

#7

Me too. Italy seems to be not supported. Is there any solution?

#8

Bulgaria seems to be not supported too...

#9

i have same problam...there is no map linking for many countries...

#10

From what I've been able to glean so far, the Geocoding and Map Linking depend on 2 different functions.

Geocoding has a few "hardwired" countries (US, UK, AU, maybe a couple more) and then relied on include files in the location module's directory named "geocoding." The only file there is google.inc and, as of now, the version included in the July 31, 2009 dev version requires that countries be added to the file manually. In other words, the countries available for geocoding was fixed and not dynamically generated from google. Yesterday, I fixed that and a patch to change to get the list dynamically from google can be found here: http://drupal.org/node/584014
Now, every country that google supports for geocoding gets listed and any new countries will become available to the module when google adds them.

Map Links, on the other hand, seem to rely on per country include files found in a directory in the location module named "supported." If you look in there, you will find a long list of files each named for a country. A quick look at the ones that work and some that don't reveals that these files require a bunch of custom functions to generate the map links on a per map service basis. This per country file separation is, I suspect, required so that one could add custom map services for each country. So, good news and bad news here.

First the bad news: to get map links for your country, you'll need to add the custom functions to your country's include file that would fit with your local map sources.

Good news: there's kind of a work around. I didn't want map links, per se, in my node. I wanted actual maps. If you use the Locations CCK instead of Node Locations, one of the options is how to display the cck field. It can be just the address data, address with map, just a map, or multiple locations on 1 map.
Granted, this only solves the problem for nodes. User Locations are still out of luck via this method.

#11

Status:active» needs review

I'm building a travel site where I want to be able to have a "See map" link to any country, but soon discovered that I only get links for ones that have the correct code in the supported/location.country-code.inc files. I started going through all the .inc files adding the functions to link to a Google map and thought there must be a better way...

So, here's a patch (against 6.x-3.x-dev from 2010-Sep-30) that adds a Google "See map" link if the country's supported/location.country-code.inc file does not yet include the necessary functions. It may be a reasonable stop-gap measure until all the .inc files can be updated?

I'd be interested in your comments. Thanks.

AttachmentSize
location-see-map-links-403634.patch 2.49 KB

#12

Component:Documentation» Code

Oops, not documentation, changing component.

#13

Hi,

I'm very new here and I don't know if this can help, anyway... I'm from Spain like the first guy and this is what worked for me: I edited "location.es.inc" file inside of "supported" folder, copying in it php information from one of the supported countries (I choosed uk because it has less code and it was easier for me). Then I replaced 'uk' appearances with 'es' appearances and of course I also replaced google uk links with the Spaniards google links for google maps and for term of use. I did not change province list to maintain the Spaniard one.

#14

Title:Map Links for none supported countries (like spain)» Provide default map links (google) for all countries
Category:support request» feature request

Marked #1101036: Have a default (google maps) map link setting for all countries as a duplicate of this issue.

Here is a patch I made before I saw this issue.
It works a little differently to the existing patch.
Instead of calling the default function if a country function doesn't exist, it always calls the default providers function and merges the results with the country function if it exists.
That way countries don't have to redefine the providers that are already in the default function, but if they like they can and it will override the default (to change the terms of service link or something).

There is still a little bit to add to remove some of the google providers from the country specific provider functions as some of them are just duplicate code now.
The patch should be fully functional though.

Patch is against latest git version.

AttachmentSize
location-default_map_links-403634-14.patch 6.63 KB

#15

This did the job!
Thx!

@rooby: will this be implemented in next releases?
Grtz.

#16

can you check this issue?
http://drupal.org/node/1160434

When instead of an address, a user only sets lat/long
I think it would be nice to create a map link only with lat/long

maybe this can be merged with [#14]

nobody click here