Currently, the US implementation is hardcoded to point to Yahoo. The US is actually covered by (at least) MapQuest, Google, and Yahoo, and it would be great to be able to select which map provider to use.

CommentFileSizeAuthor
#5 provider_selection_screen.png73.94 KBankur

Comments

robertdouglass’s picture

Furthermore, the implementation for pointint to Yahoo! Maps is probably the same or similar for every country indicating that a yahoo.inc is probably needed that all countries could draw upon. Perhaps a maps directory with supported service-specific toolkits is called for?

boris mann’s picture

You're right, Robert -- a map-provider centric way is probably best, with each map provider advertising which countries are supported.

ankur’s picture

I'm planning on implementing this sometime in the not-to-distant future. However, I was looking for pointers on the interface for handling this.

Specifically, we will have a different number of choices for each country. I'm thinking the form would be best as a two column table with the name of the country in the left cell and a vertical list of checkboxes for each map provider in the right cell. Hopefully, we can even set it up so that the checkbox also contains a link to the mapping provider's terms of service page. Any thoughts on this, anyone?

Another question to answer is whether this table form should be on the same page as location module's settings page (i.e., q=admin/settings/location) or whether it should be linked off of the location module's settings page, with a plain link or as a tab or subtab.

I'd be interested in some UI suggestions regarding this issue as it can become significant if a user is enabling features for all countries on the list.

-Ankur

boris mann’s picture

I would provide a local tasks called something like "country" and "maps".

admin/settings/location/country

admin/settings/location/maps

That page would contain a list of countries/regions from the scanned .inc files -- e.g. USA, Canada, Germany. Advanced settings per country would be on an additional page, much like admin/node does now. The map providers might be in overview columns, to quickly enable certain map providers for each country.

ankur’s picture

StatusFileSize
new73.94 KB

An update has been committed to DRUPAL-4-6 and HEAD.

Attached to this follow-up is a screenshot of what the admin interface looks like for selecting one or more mapping providers for each country. In this interface, only the countries that have been "enabled" appear in the list. The list of providers for each country and the code which generates the deep links follows an API described in extending_support.txt (which has also been updated). If you're interested in seeing how to add a certain provider to the list for your particular country, please see modules/location/supported/location.us.inc for examples or contact me (http://drupal.org/user/11703/contact)

IMPORTANT: There are no DB updates for this particular update. HOWEVER, after you replace your existing location files with the updated files (these include location.module, location.inc, location.de.inc, location.us.inc, and location.ca.inc), you will notice that some deep-links aren't generated anymore. This is because you now have to explicitly choose which mapping services you want your site to deep-link to.

-Ankur

ankur’s picture

Status: Active » Fixed
Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)