Closed robertdbuckley closed 12 years ago
I was using USHAHIDI VERSION: 2.3.1..by the way....be great if it worked with latest version ;-)
This plugin works with 2.2 very well, developed and tested it with 2.2 but forgot to upgrade it to support 2.3
I have tested the plugin with 2.3 and i am getting the same error, on close inspection, it seems the plugin installation code isn't working. {Still investigating why?}
Beyond that error, there is another error that i am encountering(Some weird JavaScript error) {Still Investigating}
You can utilize Mackay's plugin https://github.com/rjmackay/Ushahidi-plugin-metacarta. for now as i fix those bugs.
Mackay's version works great for basemaps, but adding wms overlays seems to be more difficult. I assume that that is what your version does having looked at your code in config/map.php?
I´m getting the same error with Ushahidi 2.2!
FILE: application/helpers/map.php LINE: 41 ERROR: Undefined index: google_normal
URL: maps.zgb.de/ushahidi_22/admin/settings REFERER: http://maps.zgb.de/ushahidi_22/admin/settings/site _USERAGENT: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 IP: 87.139.33.85 USHAHIDI VERSION: 2.2 DB VERSION: 76
Am I doing something wrong?
Released a new version
Ver 0.2 Fully tested with 2.3 and 2.4 & Ver 0.3 fully tested with the latest code 2.5
Hi Seth,
In the ushahidi dev forum Heather asked to test the new wms plugin written by yourself.
I have tested on 2.4 and 2.5 and both times I receive the following Error message.
application/helpers/map.php [42]:
Undefined index: osm_mapnik
I have tested the plugin with the default layers from opengeo and from my own geoserver, but I have not had any success.
Thanks,
Robert Buckley
Von: Seth Kigen reply@reply.github.com An: Robert Buckley robertdbuckley@yahoo.com Gesendet: 15:23 Donnerstag, 2.August 2012 Betreff: Re: [Ushahidi-plugin-wms] instead of line 100 it was line 124 with latest Ushahidi release (#1)
Released a new version
Ver 0.2 Fully tested with 2.3 and 2.4 & Ver 0.3 fully tested with the latest code 2.5
Reply to this email directly or view it on GitHub: https://github.com/kigen/Ushahidi-plugin-wms/issues/1#issuecomment-7455019
Thank you, Robert for testing the plugin. This error seems to be a result of an unsuccessful installation of the plugin. I would kindly like to know
This info will help me diagnose the genesis of the error. Thank you!
Just noticed a typo in hooks/wms.php line 17 "regsiter_map_layers" - should be register.
Not a solution to the problem though!
Hi seth.
"regsiter_map_layers" is consistent - so can´t affect the code!
Question 2: I did the following on linux for version 2.5 (I also tested sudo git clone https://github.com/kigen/Ushahidi-plugin-wms.git -b 2.5
Question 3: ID = 22 Value of default_map = google_satellite
It seems therefore that the wms_install.php is not working!
ok...I manually edited the database with the settings in wms_install.php and can see the maps defined in the wms.php settings file! Great work!
One question though. The Plugin needs to set a basemap AND an overlay layer. If the wms_base does not exist in the wms.php file in the plugin directory, the map does not default back to osm_mapnik. Therefore as far as I can tell, there is no way to define wms overlay layers which display with a mapnik/google etc....or is there a way to create a layer config for the osm_mapnik layer and the wms overlay?
Thanks again for helping me test this plugin. I will try looking into the plugin installation issue.
I was thinking of the same issue was few minutes ago. I will have to rethink the whole plugin again.
I see....would it be possible to put the service_url variable into the layer config? This would at least allow the user to use different wms layers which come from different geoserver services....and also allow wms_base to be configured independantly of the service_url.
for example: something like this
$config['layers'] = array( 'wms_base' => array( 'title' => "OpenStreetmap", 'name' => "osm_mapnik", 'openlayers' = "OSM.Mapnik"; 'api_url' ="https://www.openstreetmap.org/openlayers/OpenStreetMap.js"; 'base' => TRUE ) , 'overlay_1' => array( 'title' => "Theme 1", 'name' => "zgb:grenzen_lk", 'service_url' => "http://maps.zgb.de/geoserver/wms", 'base' => FALSE ) , 'overlay_2' => array( 'title' => "Theme 2", 'name' => "zgb:wea", 'service_url' => "http://maps.zgb.de/geoserver/wms", 'base' => FALSE )
);
Is there also a way to alter map.php and allow overlay layers here? e.g
public static function overlay($layer_name = NULL) { $layers = array();
// CONFIG FOR MY OVERLAY LYR
);
$layers[$layer->name] = $layer;
Why do ALL layers in applications/helpers/map.php get set to "baselayer" even though 'baselayer' => FALSE,????
What is overriding this?
I´ve just got wms working as a hack!
I simply added this to line 440 in ushahidi.js
var layer_zgb_grenze =new OpenLayers.Layer.WMS("Planungsraum Grenze", "http://maps.zgb.de/geoserver/wms", {
layers: 'zgb:Grenzen_ZGB',
format: 'image/png',
transparent: true,
singleTile: true
}, {
'buffer': 0,
'opacity': 1,
'isBaseLayer': false,
visibility: true
});
var layer_raum =new OpenLayers.Layer.WMS("Planungsraum Grenze", "http://maps.zgb.de/geoserver/wms", {
layers: 'RROP08 Raum und Siedlung (Gruppenlayer)',
format: 'image/png',
transparent: true,
singleTile: true
}, {
'buffer': 0,
'opacity': 1,
'isBaseLayer': false,
visibility: true
});
this._olMap.addLayers([layer_raum,layer_zgb_grenze]);
The latest commit fixes all of the above issues.
Hi, just wanted to ask if there is any progress on creating a plugin for wms overlay layers? Is this a priority for ushahidi?
Hi Robert, This version of the plugin supports wms overlays. Now you can have OSM/Google as the base map and use this plugin to attach wms based overlays. The earlier version required a full wms setup, where the base layer had to be a wms based layer to have wms overlays.
really? I have to test this out. Does this work with ushahidi 2.5 or 2.6?
Date: 01-05-2012
In my installtion I added the code to line 124 like so...
however I keep getting this error when I activate the plugin and try to load the main page of Ushahidi.
An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator. application/helpers/map.php [42]: Undefined index: osm_mapnik