I tried using the Views integration in gmap.module without using location module (it did not say location module is required), but there is a single promise of a TODO item of autodetecting "longitude" and "latitude" named fields, when location module is not available and the autodetection mode is chosen. The location module way does not work without location module and the other is not implemented. So either that autodetection would need some love, or if pointless, then the views integration should be moved to gmap_location module IMHO, since that requires location, so the dependency would be met. What do you think?

If you choose not to move the support to the submodule, I assume Views does not cache options forms, so you can display the location.module item dynamically only if location.module is available and enabled. If not, you could return the autodetection module only. I am up for doing a patch for that, if you happen to have time to work on the autodetection code :)

Comments

gábor hojtsy’s picture

@bdragon: What do you think would be the best way to go forward?

drewish’s picture

Status: Active » Needs review
StatusFileSize
new7.19 KB

The attached patch updates the views support to use version 2 of the API and lets you specify fields to use for latitude and longitude.

Marked #338300: views with style "list" works, views with style "GMap" shows blank content in page as a duplicate of this.

yesct’s picture

The duplicate was my issue... so I'm tagging along following this one too. Thanks. :)

sjf’s picture

Just tested this and it works perfectly - I can now use relationships with gmap. Many thanks for this!

gábor hojtsy’s picture

Code looks good to me. Just two comments:

- It might make sense to reuse uses_fields() in place of the if() checking for the same.
- The added FIXME would be good to clean up, although it looks out of scope for this issue.

Since these are not significant issues, I am not moving back to needs work. Would love to see this improvement land.

davidhk’s picture

The patch also works fine with 6.x-1.0.

bdragon’s picture

I did a lot of work on the gmap style plugin yesterday, most of the problems should now be solved.

Boletus’s picture

What do you recommend? Using the dev version or patch the Gmap 6.x-1.0 with http://drupal.org/node/352553 ?

I need the Marker action in Gmaps generated by views.

Thanks for a great module!

russbollesjr’s picture

This doesnt seem to be working correctly for 6.x-1.1-rc1. As shown in the screen shot there are no options to choose for the lat and long fields. Any thoughts?

russbollesjr’s picture

StatusFileSize
new183.75 KB

Looks like my picture attachment didn't work for some reason. Trying again.

russbollesjr’s picture

never mind, found http://drupal.org/node/371134. Which fixed the problem.

EvanDonovan’s picture

Status: Needs review » Postponed (maintainer needs more info)

Does this still apply to 6.x-1.x-dev? Reopen if it does.

bdragon’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

I'm going to wontfix this because the gmap views display plugin is moving in the opposite direction -- less and less location specific.