ushahidi/Ushahidi_Web — Issue #209: allow callbacks or query strings to define information displays
Author: andrewmallis
Created: 2012-02-16 02:34:52+00:00
State: open

At http://map.occupy.net we often want to highlight one or many events on the homepage. For example, on a day of action, we want to compress the timeline around the events of that day and zoom the map in more closely on the event's location. However, multiple events are often happening simultaneously, and it would be useful to zoom in on Oakland or New York city by visiting different URLs.

We have to date employed subdomains so that we can maintain multiple configuration defaults. It would be preferable to have query strings or callbacks inform the display interface.

Query string example:
map.occupy.net/location?q=New-York&date=2012-11-12&type=action

Callback example:
map.occupy.net/us/

Combined callback and query string
map.occupy.net/us/fl?q=date=2012-02-02&time=1300-2100

In addition, this functionality would allow users to embed event-specific maps in iframes on their website to accompany news stories, and the circulation of links via email or other means to directly access segmented reports.

## Examples

### Google Maps
Their interface is ajax-enabled and you can zoom, pan on the map, then "share" or export your search so it can be repeated, i.e.

http://maps.google.com/maps?q=80+Fresno+Street,+San+Francisco&hl=en&ll=37.797742,-122.405505&spn=0.003917,0.005783&sll=37.793372,-122.409711&sspn=0.031335,0.046263&gl=us&hnear=80+Fresno+St,+San+Francisco,+California+94133&t=m&z=18

(and google recently added a URL shortener feature which optionally converts the above to http://g.co/maps/pycv9)

###Our Directory site at http://directory.occupy.net

(built in Drupal) also behaves similarly

query only:
http://directory.occupy.net/occupations/list?title=&country=CA&items_per_page=10
callback+query
http://directory.occupy.net/occupations/list/us?title=New&country=All&items_per_page=50