Yeah the mapping code is a bit of a mess for sure. I totally agree with the lack of hooks in the JS and the fact that you can't overwrite the JS views like you can overwrite the HTML views in the themes.

For the work I've done, I try to find sneaky ways to hijack the existing JS and get it to do what I want. Check out my two mapping plugins. You can see how I did things. If you have specific questions let me know.  https://github.com/jetherton/adminmap, https://github.com/jetherton/densitymap.

I'd like to see a MVC architecture taken to ushahidi's mapping system. Where the map is just a view, and things like timelines and category filters become controls, all using a standardized API. Makes me smile just thinking about it.


John Etherton
+1-404-578-1606
john.etherton@...

On 02/02/2012 05:49 PM, George Chamales wrote:
I second your issues with the mapping system.  Overwriting the js is the approach that we've used in the past to shoe-horn more useful functionality into the map.  John Etherton's rewrite of the mapping functionality for the Admin Map / Big Map plugin is also out there.

What sort of things are you looking to add?

george

George Chamales
Rogue Genius LLC
http://roguegenius.com
Phone:  718.288.7718
Skype:  notgeorge




On Thu, Feb 2, 2012 at 4:28 PM, Mr. Evoltech <evoltech@...> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello All,

This is my first post to this list.  I am the lead developer of the
March-Hare Communications Collective.  We are adding a number of
features to Ushahidi to make it a bit more suitable for real time report
aggregation and publishing at the street level for protesters.

Right now alot of the functionality we are working on is in the
OpenLayers code of Ushahidi.  While there are ways to hook into
different sections of functionality for the site there do not seem to be
many ways to hook into JS.  To make issues more difficult for developers
who want to customize the mapping features of Ushahidi it seems like
there is a fair amount of duplication of OpenLayers code in the
project.  I am wondering if anyone can speak if there are any plans to
address these issues and / or if there is a specific way it is intended
for developers to hook into the OpenLayers JS for mapping pages?

Currently the technique I am using is not to override the
/application/views/*_js.php files, but to use the
ushahidi_filter.header_js event to override javascript functions in the
end of the JS that is inserted in the html header with code like so:

preg_match(':^(.+)(//-->\s*</script>\s*)$:s', Event::$data, $matches);
$new_js = " ... ";
Event::$data = $matches[1] . $new_js . $matches[2];

Sincerely,
evoltech


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPKyoQAAoJEDTy25qNIucjXQsQAM4NOb9vQEf8WBObEmshYHqt
NG7eBGUMJ93gZbGxVlcYWEM52VGTj7PgGaPP6Zdw1ZXTjHpS/EJJ4I4uxS1zKD9J
4IsaCWdA4QB9zaQgshSqrFxLD5YVh1zcHouCpL4ul9uX/oa4gGQqPUe9fCRGtWcd
zzKU26nQ7Yh+X+HUwzNQdJG1/1BuAXrI7kxY4pAEFECDSSHADwG79MWBcjvTcntz
LO7dbrWD2m1rArS7Iq6DXWWDN0DIEarCPsyO4JztyNbRlBk7tVrCKcqwHrcPY9sQ
SCQD1EW2as6JSdX6oJ5c6fiZ1rTkfaN38H2APNfHNF/mvTzHIl+Aj3gsUSYxfDyO
ENe/HTax1MMlbtye3jYEctarfNMR77++jAzD86Sp5AAnH6GnoEW9iG2444HMYx/W
A/vTzbW7LpFjUEhAFuVrm8Eq1Ot6kTn/iOJwPxAg8/bITWWrhMZLypdmShldE2OB
6bqeTInzb8/ZJeUI8sde6ERifTcuVkqGgsxoboVaBH2OQL1wVuBRUt9J0b1H3VhN
16SZ7yJKRxK43meUzPcIJi91MZi8NKp2bvfezlnhl85+iw884MLV2xailmOlF9cY
BYdsrFQAoRTRAaMxCW3LsRJt8kyyw/jySfPc2v52fF+1MnRFO3kIyVrpgJg9IXvG
UIYRxorlD/gjJtxapaQl
=L+Vt
-----END PGP SIGNATURE-----




~~~~~~~~~~~~~~~~~~~~~~~~~~
List Archive: http://list.ushahidi.com/

Would you like to receive list mail batched in a daily digest instead? Send a message to:
developers-digest-subscribe@...

To remove your address from the list, just send a message to
the address in the "List-Unsubscribe" header of any list
message. If you haven't changed addresses since subscribing,
you can also send a message to:
developers-unsubscribe@...

For addition or removal of addresses, we'll send a confirmation
message to that address. When you receive it, simply reply to it
to complete the transaction.

If you need to get in touch with the human owner of this list,
please send a message to:
developers-owner@...