Git Product home page Git Product logo

ushahidi-plugin-kmlfilter's Introduction

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);

ushahidi-plugin-kmlfilter's People

Contributors

lmmrssa avatar

Watchers

Neil Horning avatar  avatar

Forkers

bartelo

ushahidi-plugin-kmlfilter's Issues

Map should automatically zoom in on filtered region.

Sometimes a use will want to filter by a VDC or district without knowing where it is. Currently if there are no reports in a given area, if you select it on the right, you won't have any information about where it is. If you do find where it is, you have to click several time's to zoom in on it's location. Even when a user already knows where a given area is, it would be better if they were taken there to view the map of reports in the area rather than having to click several times to see them.

Functionality: A user clicks on a district or vdc in the menu, or clicks on the "fliter" link on the map, and the map automatically zooms so that it's borders are take up most but not all of the map window. If the user clicks on another area, in the menu the map automatically moves to that area.

Graph doesn't update

Even with the code suggested in the readme, the graph on the home page does not seem to reflect the KML filtered reports.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.