The location module allows you to associate a geographic location with nodes (using the included Node Locations sub-module or the included Location CCK module), users (using the included User Locations sub-module) and taxonomy terms (using the included Location Taxonomy module).
Locations can consist of the following fields:
- Location name
- Street location (sometimes referred to as street 1)
- Additional (sometimes referred to as street 2)
- City
- State/Province
- Postal code (sometimes referred to as zip code)
- Country
- Coordinate chooser - This consists of Latitude and Longitude fields. If you are also using the gmap module users can enter these coordinates by clicking on a map.
- Phone number (provided by the included Location Phone sub-module)
- Fax number (provided by the included Location Fax sub-module)
There is also views support, which adds the ability to use location data as fields, arguments, filters and sorts and there is search integration for searching for content via location information (provided by the included Location Search sub-module).
Views and location search are also capable of doing proximity searches based on postal code (this requires some extra installation steps).
Using the gmap module along side the location module also allows you to show view results as markers on a google map.
Comments
Example of programmatically adding a node with a location
Hope this helps someone.
Problem: I needed to create a new node/location in the callback function of a Views Bulk Operation (VBO). The view has provided the callback function a list of contractor node IDs within a given radius of an entered postcode (in $objects). and now we need to create a new enquiry node pre-populated with the list of contractors and the postcode entered in the view filter (form $context).
The user must then be presented with an edit form to complete the rest of the fields.
Solution:
Helpful post, but...
... at the end I think you might have meant:
Anyway, that's what worked for me.