Make Latitude & Longitude compulsory fields? and Location & gmap not working together properly...

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
voodootea's picture

Hi

Using the CCK, location, views, gmap and Gmap_location modules, I have 2 main problems;

  1. I CANNOT find a way to set the 'latitude & longitude' fields as 'required' on a CCK form

  2. Is there any way for these Location and Gmap modules to work together to 'validate' each other and not allow bizarre types of location data into a node type? (E.g. not allowing to form to save something like city: London, country: USA, GEO co-ordinates: tokyo)

This is what i have done...

I have installed the following modules: Location, Gmap, Gmap location, CCK, views.
I Activated googlemaps geocoding for UK in /admin/settings/location/geocoding.
Using views I created a node as type 'gmap' to filter type 'userprofile' (ive made a test content and its displays fine on the map node page)
I have created a new content type called 'userprofile' with CCK, in which i have activated the location fields; set fields city and country as 'required'.

I deactivated the 'use googlemap to set latitude and longitude option in /admin/settings/location (ive done this to make the lat/long set only by location value, as the user can easily break things by placing a marker (thus automatically creating a geocode) in a completely different location to address data entered in the location fields!)

In certain cases the user is able to submit the form without any geo data being created. This means that the node will not appear on the gmap view. Is there any way to make this compulsory, in CCK or otherwise??

I could potentially end up with loads of content with a location field but no geo data, therefore making it useless as the site is all about searching for content through the gmap view...

As mentioned before, I'm not using the googlemap to allow the user to pin a location as location and gmap do not work together properly. but as i also want users to be able to search for data on city/county etc rather than searching by co-ordinate.

Again, any ideas on either making these modules work better together or forcing lat/long fields to be compulsory?

Any help on this appreciated!
DOM

using Drupal 6

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: