Skip to content

lmmrssa/Ushahidi-plugin-kmlfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KML Filter

About

Description

*Adds layer filter to reports index filter page *KML file will require some changes *If want don't want to work on KML file then prefer another branch (gadm) with KML files from

http://www.gadm.org

Installation

*Copy the entire /kmlfilter/ directory into your /plugins/ directory. *Convert KML file in format mentioned on NOTE *Activate the plugin.

NOTE: *KML file requires

<Placemark>
	<ID></ID>
</Placemark>

tag with unique id inside <ID></ID> for each <Placemark>
and coordinates should be in format

<Placemark>
	<MultiGeometry>
		<Polygon>
			<outerBoundaryIs>
				<LinearRing>
					<coordinates>
					</coordinates>
				</LinearRing>
			</outerBoundaryIs>
		</Polygon>
	</MultiGeometry>
</Placemark>

*If activating plugin does not show location filter on main page then search for

if (layerType !== Ushahidi.KML) {

and its related

}

code in media/js/ushahidi.js and comment out these two lines

*If plugin does not filter timeline by location then search for

// Fetch the timeline data
$query = 'SELECT UNIX_TIMESTAMP('.$select_date_text.') AS time, COUNT(id) AS number '
. 'FROM '.$this->table_prefix.'incident '
	. 'WHERE incident_active = 1 '.$incident_id_in.' '
. 'GROUP BY '.$groupby_date_text;

in controllers/json.php under function timeline() and add

Event::run('ushahidi_filter.timeline_update_query', $incident_id_in);

About

Add filter using KML layers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages