I am setting up a classified ad site, and would like to include a user-configurable map in each ad. Advertisers will all be rural, with farm-gate sales. Would be nice to provide a map so the users can find them.
I installed gmap, gmap_addons, gmap_latlon and location modules. Everything configured fine. I then added a gmap field to the ed_classified content type. All that displays is the control and the Google logo and copyright. Clicking on the logo takes me to the correct map in Google maps.
Thought maybe a marker would be required. Nodeprofile and usernode work perfectly with gmap! Entered "users/$user" in the Marker noderef box. Now I have a "warning: Invalid argument supplied for foreach() in /usr/local/data/d5.7b/sites/all/modules/gmap_addons/gmap_cck.module on line 518." error as well as no map display.
Checked input format for Filtered HTML. Filter order is URL>HTML>Line Break>GMAP.
My advertisers will not be savvy enough to generate and place code snippets. I need the same interface you present in the admin/settings/gmap screen. What am I doing wrong here?
Comments
Comment #1
Triskelion commentedSorry. Omitted environment. I am running Apache on Linux, PHP 5.1.9, MySQLi 5.0.19 and Drupal core 5.7.
Comment #2
mrb commentedI think you want something like: http://www.batgung.com/node/add/place
The first step is to 'location-enable' your content type - ed_classified for you, 'place' for me. In the Administer > Content management > Content Types page, I editthe place content type and expand 'Locative information'. There I set 'Maximum number of locations allowed for this type.' and 'Default number of location forms:' to one.
Then on the Administer > Site Configuration > Location page I checked the 'Use a Google Map to set latitude and longitude' box. That allows the user to set the location via a GMap, instead of having to type in values for latitude and longitude.
Once you have a bunch of adverts each with their location, you can look at the views module. Then you can display all the ads on one big map, something like http://www.batgung.com/place-map-search
Comment #3
rooby commentedDrupal 5 is no longer supported.
If this issue affects drupal 6 or 7 please look for an existing issue for that version or else update this issue accordingly.