Hi Gabriel,
The mapping on the frontend is handled by media/js/ushahidi.js .. which wraps a lot of openlayers functionality.
On the main page, you should be able to update the map focus by doing something like this (in js):
map.updateMapCenter({latitude: 0, longitude:0});

The quick hacky way to build your cities switching would be to hard code the list of cities and latitude into the frontend view, add .click() handlers to each link to a city, make the click handlers call map.updateMapCenter..

A better way to do it would be build a plugin and use that to render a separate list of cities, you could use the existing cities table to get city lat/lon values, and inject it into the filter list or somewhere similar using Events. Sorry thats a bit vague on details.. but I can try to answer further questions.

I think http://map.occupy.net/ had some similar functionality where you could load urls like: http://map.occupy.net/reports/view_location/133 but I'm not sure how reusable that is. I think it would be quite a job to extract that code.. (repo here: https://github.com/occupynet/occupymap)

Robbie



On Tue, Oct 8, 2013 at 10:01 AM, Gavin Cameron <gavin@...> wrote:
If you get anywhere with this please share. I'd find this valuable functionality too, but I do not have the dev skills.


On Mon, Oct 7, 2013 at 3:46 PM, Romulo Pires <romulo.pires123@...> wrote:
Hello,

check panTo function in openlayer documentation.


2013/10/7 Gabriel Machado <gabrielmcf@...>
Hi people,

I'm Brazilian and new at Ushahidi!

I'm trying to make a modification in Ushahidi so that i can list a bunch of cities and, when i click a link, it changes the focus of the map to a given city.

I've started last week to study the codes from Ushahidi and i'm a little bit lost. Im a programmer but have never worked with web languages!

Im not sure how should i proceed, im trying to do this just changing the theme and some javascript because i'm in a kind of a hurry, but i want to develop a plugin to do this.

Do you have any idea how should i proceed? Any suggestions?

Thank you very much and congratulations for the project, its just incredible!

See you,
Gabriel Fonseca.



--
Romulo Pires Pinto
UFF/IC/BCC



--
best
Gavin

Crowd-sourced Architectural Salvage | trashswag.com

Too brief? Here's why! http://emailcharter.org



--
Robbie Mackay

Software Developer, External Projects
Ushahidi Inc
e: robbie@...
skype: robbie.mackay