Use cases
public
group: Location and Mapping
smoothstr@drupal.org - Sat, 2007-12-22 15:38
I wonder if we could come up with a bunch of use cases.
I've been working on mapping for a client, and it's a very hot area at the moment. There are loads of projects in the wild and a whole host of back end tools. Coming up with a decent list of what we expect to be able to do with Drupal seems like a good place to start. Of course lots of these use cases will already be covered in the existing modules.
Put your ideas in the comments. If this is a successful strand of conversation, then we'll probably need to work out which of the use cases are most important.


Addresses
Addresses.
Location module accepts addresses. Ecommerce Ec_address module uses addresses - keeping an address book for the user. In EC3 there's no integration. In the upcoming EC4, there's an adapter module to allow ec_address to user location. I think addresses and latitude+longitude are two different but related concepts and that an address module is needed. The address module would provide forms for entering addresses and address parsing. It would be capable of hiding the country portion of the field, as cck_address can do - filling it with a default. Optionally, of country was switched off, it would provide a link to allow alternative addresses.
Because addresses are so different around the world, I'm thinking users need to be able to annotate the fields as they enter them. I'm thinking of this both for address forms and perhaps address data held in arrays. For example being able to note for the system that the first item is not a road name, but a house name.
There's a lot of solid work already on address representation - see http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ciq#download for xAL (extensible address language) details. (I'm not arguing that it's a good idea to hold data in XML format - I'm simply pointing to the work that's been done on the semantics of addresses.) When you look at this, you may be as horrified by the complexity as I was. After some reflection I'm not as nervous because I think the bulk of addresses can be described in a few layouts and the default layout is specific to a country.
I'm imagining using javascript on forms to show and hide fields depending on the country chosen.
It would be useful to be able to attach address information to nodes. Location module lets you do this.
cck_address lets the user choose from a list of known addresses.
Relationship between latitude, longitude and address
Another use case.
I need to be able to keep
A latitude, longitude and area for the UK.
A latitude, longitude and area for London.
A latitude, longitude and area for some large locations - for example Hyde Park.
A latitude, longitude and address for some locations - e.g. Joe's High Flyer Pizza Bar, 10th Floor, Leaning Tower of Piza, Piza.
I need to be able to aggregate so that I can show all locations in the UK, or all locations in London.
This IS a case where latitude and longitude and address are all required.
+1
A mall or business complex with multiple-units of the same address.
12 Main St. = same latitude, longitude but address has a unit #
ie: Suite #2, #3, #4, etc. or 3rd Floor #3200, #3210, #3230, etc.
Maybe the node on this location could link a list of units with same lat/lon
Map locations
Latitude, longitude and optionally altitude need to be stored in such a way that they can be attached to nodes.
This is what the location module does.
It may be useful to know if the location is exact or if it's approximate, which is what you might expect from a geocoded address.
One or more map symbols may be associated with a location. Possibly through a taxonomy.
Displaying map locations
May need locations in layers - e.g. geobrowser module does this in the example.
May need to group locations
May need to hide locations at particular zooms. E.g. one location for Chicago resolves into 20 when zoomed in.
May need to limit the number of locations to avoid long load times.
May need some sort of caching to avoid repeatedly querying the db for massive numbers of locations.
Users may need the ability to move map markers to edit location data.
Useful queries
Find all 'nearby' locations. Nearby is within a user defined radius.
Find all nearby locations of a particular type.
Areas
It's sometimes useful to be able to map areas.
Would it be useful to attach these to nodes? One area may cover many nodes.
Areas and % shading/coloring
% shading/coloring is important when drawing areas. (polygons)
e.g This plotted area is covered by this organization and are supplying 10% of the need (e.g. for feeding or Aids orphans)
Routes
It would be useful to be able to show routes on maps.
How do routes and nodes inter-relate?
A node might hold a route. (Implies that users should be able to add routes to nodes.)
A node might be one of the points on a route.
Displaying routes
May need routes in layers
May need to hide routes at particular zooms. E.g. Interstate, state and local routes.
May need to limit the number of routes to avoid long load times.
May need some sort of caching to avoid repeatedly querying the db for massive numbers of locations and routes.
May need to display different markers forthe waypoints on the route.
The ability to show the route in an animation is fantastic.
+1 for routes
Hi,
I am very much for routes.
greetings,
Martijn
See my story
See Howto: Creating user friendly mapping for non-drupal nerds for a method of creating a route.
Of course it wouldn't be quite the same as what people expect from route, but it gives you an idea of how to make a route in a more abstract sense.
Geocoding
Ability to convert from address to location info.
Should be a plugin system - there are various geocoding services. Google and Geonames.
I think that cck_address may do this.
From map to location
Clicking on a map to note locations is very useful.
Users may need to click on more than one location to build up a list
Users may need to scroll or zoom the map.
Mapping backends
A difficult problem: to support only one mapping provider or multiple?
See http://www.mapstraction.com/ for an interesting js layer abstracting multiple map providers.
I favor one - Google. What do other people think?
Create Wiki page
I like this discussion - however, this type of collaboration would be better suited for a Wiki content Type, next time instead of creating a Story node on g.d.o use the Wiki page content type. :-)
Yep, that would have been better. Sorry.
+1.
Jeff
Map Drawing Tools
A set of Drawing Tools
These will need to display and function like any other map objects on the map.
Line
Circle
Square
Polygon
Adding Text
Adding Markers