Adding layers to the map


#1

Hey guys,


Does anyone know how can I add other layers to the base map in Ushahidi? There is a selector on the top-right corner, and that lets you select layers and groups of locations, but there's currently only one option.

I would like to add other categories, or work with some polygons to be displayed/hidden on the map.


If you have any advice/tip/directions, I would appreciate it.


Cheers,


Pablo



#2

Hey Pablo,


We've got a build on this next Goma release to address just that. It'll allow you to add a KML or GeoRSS feed and then overlay that on top of your regular data. It'll be rudimentary at first, but it's a start.



#3

It doesn't seem to be there (looking at demo.ushahidi.com now), are we talking about the same thing? It will be great to have some layers/overlays for each shared instance of Ushahidi, or even add other map-based data, like polygons.


Cheers,


Pablo



#4

Looking at OpenLayers now, if anyone is experience in OpenLayers, and want to do some consulting work, get in touch with me!


Pablo



#5

I do not understand: does ushahidi allow the upload of kml files?

Thanks

elena



#6

Not yet for what I can see. It is in the pipeline. Still, you can work with OpenLayers to add your own layers to the main map. That's one of the things I'm trying to crack now.


Pablo



#7

great! I am convinced that such a tool could be extremely useful if it could show information such as risk maps, so to better analyse the area to be monitored.



#8

The OpenLayers code for the front page is in


main_cluster_js.php

(or main_js.php is clusering is turned off)


So any Javascript you like can be added there. For instance, you could add something like this after the existing map.addLayer call


var newl = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss.xml');

map.addLayer(newl);


You'll have to add a proxyHost (http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost) if the GeoRSS or KML file lives on another server.


A bit more detail on http://openlayers.org/dev/examples/georss.html



#9

I installed Ushahidi and in the admin panel I found out that I can upload kml or kmz files.

I did, but it seems it does not work.

Could you please give me some help?



#10

How? More details will help.


After uploading the KML or KMZ file, there should be other layers added to the frontend.



#11

I'm having a similar problem with loading KML files.


The loading seems to go fine with no error messages, but I do not find the uploaded layer either on the home page (under category filters) or on the admin panel (under layers). What might be going wrong ?


Related to this issue, what is the appropriate value for Layer URL (when I'm uploading a file) ?


Thanks,

Selvam



#12

Seems like the viable option is to go muck around with main_cluster_js.php to get layers working.


If this feature is supposed to work without any tweaks, please holler what we might be doing wrong.



#13

http://goldhillfire.crowdmap.com/


I have been using the preinstalled ushahidi via crowdmap, and this still seems to be a problem. I tried to change 'cluster points' in settings, and changed my kml from a url to an uploaded file, but it didn't help.


We did get this working on a previous map with kml we created and exported from google earth. There seems to be some good kml files out there that have (WAY) more data than the map needs. It might be good to build a tool into ushahidi to help address this as well.



#14

This is working for me now if anyone is interested.  I’m not sure if the URL method worked…ok just tested…it does :smiley:  2.6.1


#15

cgchoffman - i’m curious on what worked for you

and for everyone interested in layers - in particular i want the layer to show up when people Submit Reports.

my goal is to use my deployment - http://www.greatlakescommonsmap.org

and i want to have layer for a proposed Tar Sands pipeline on the map so folks can post their questions, videos, protests to the project - but they need to see it both on the main page - and on the Submit page since their Reports will be in-relation to the pipeline itself. i’ve got a KML file for the pipeline. this layer shows up fine on the main page once selected. (hidden right now)

is it possible to do what i’m trying to do? i’m working in version 2.4 now but upgrading to 2.6 in the coming days.

thanks.


#16

HI Paul, I’ve pinged the developer team to take a look at your request.

I think that it would be highly custom to add this to the submit report page.


#17

Hi Paul,

The feature described above would probably require some customisation to be built into the ushahidi platform at the moment. We are moving towards work on version 3.0 of the platform, and have a feature freeze in effect. However, we do welcome members of the community to send in pull requests as we get closer to releasing v3.x.

Have a look at some of the work and items fronted for v3

https://wiki.ushahidi.com/display/WIKI/Ushahidi+3.x+Wishlist

 

https://wiki.ushahidi.com/display/WIKI/3.x+Roadmap

https://wiki.ushahidi.com/display/WIKI/Ushahidi+Platform%2C+v3.X

Angela