Code Monkey home page Code Monkey logo

neatlinefeatures's Introduction

NeatlineFeatures

NeatlineFeatures offers the ability to graphically encode and edit geospatial shape metadata for Omeka items. This is stored in the coverage field alongside the textual coverage information, allowing you to add rich, multi-faceted geospatial metadata.

Installation

  • Upload the ‘NeatlineFeatures’ plugin directory to your Omeka installation’s plugin directory. See Installing a Plugin.
  • Activate the plugin from the admin → Settings → Plugins page.

Usage

Once installed, NeatlineFeatures adds an option to the Coverage field for the Dublin Core Element Set named "Use Map."

Add Coverage

Go to the Item Edit view for the item you want to associate a geospatial feature with. Scroll to the Coverage field and select "Use Map"

This will reveal a map with some basic editing tools. If your browser supports this and if you give this page permission to know where you are, the map will also center on your current location.

Simply zoom to the location you want to draw a feature on, select the drawing tool, and draw.

There are three drawing tools, from left to right:

  • Polygon is for drawing multi-sided, closed shapes;
  • Point is for drawing points;
  • Line is for drawing lines and open shapes; and
  • Selection is for selecting and editing the shapes.

Along the bottom of the map are also a number of tools you can us to change shapes you've selected:

  • Save View bookmarks the zoom level and map center point, which will be used whenever anyone views that coverage map;
  • Delete removes a feature from the map;
  • Drag adds a point to the shape so you can drag it to another location;
  • Scale adds a point to the lower right of the shape so you can scale it and flip it; and
  • Rotate adds a point to the lower right of the shape so you can rotate it.

NeatlineFeatures also provides you a choice of base layers for your map. To select a different base layer, click on the stack of papers in the upper-right corner of the coverage map and select from the list.

Textual Information

The feature metadata is in addition to the standard coverage field. You can still enter text and HTML into the coverage field.

View Coverage

Once you have drawn a coverage on an item, an interactive map viewer will appear on the item view with the coverage you drew.

Any text entered in the coverage field will display under the map.

Note: If you are a theme developer, be sure to include the  public_append_to_items_show() hook where you want the map to appear in your theme.

Support

We use an issue tracker for feedback on issues and requested improvements. If you have general questions, you may also post them to the Omeka Forums  or the Omeka Developers Group.

Credits

Translations

  • Martin Liebeskind (German)
  • Gillian Price (Spanish)
  • Oguljan Reyimbaeva (Russian)
  • Katina Rogers (French)

neatlinefeatures's People

Contributors

davidmcclure avatar erochest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neatlinefeatures's Issues

Sometimes saves to weird projection

There are some instances where NeatlineFeatures saves WKT using weird projections, converts lat/long values to very small values, close to zero. Seems to be trying to convert annotations to another projection.

Make button IDs unique

Since Features can have multiple map widgets (unlike Neatline), the Delete, Drag, Scale, and Rotate buttons need to have unique IDs.

Refactor UI, "Use Map"

On a new form, the coverage field should look like the default Omeka form with a checkbox that says, "Use Map".

When "Use Map" is selected, the map would appear below the current box. It would have the OpenLayers map with editing controls and a way to view the raw codes.

The actual Omeka coverage field would be the raw codes field, which would be automatically updated from changes made on the text field and the map field.

The raw coverage field would then contain:

We're throwing a lot of stuff in the coverage field. It seems like having a separate table for it might make more sense.

Add a Reset button

Users should be able to remove any changes they've made since the page was loaded. Add a "reset" button to the feature map to implement this.

Value overflow on map positioning

If the map is positioned too far west, say around longitude/X coordinate -12459847 (Salt Lake City), the position will overflow to -9999999.99999 (near Peoria). The values are stored properly for the features.

Support more formats for entering raw data

Currently, NeatlineFeatures only recognizes WKT using EPSG:3857 (the official designation for EPSG:900913) being directly entered into the raw text box. In the future, we should support at least KML and maybe GML.

This brings up the issue of what projection this uses, so we'll need to figure out some way to prompt the user for the projection.

Break all data fields out of the hidden text field into their own hidden fields

Currently, there's a visible field for free-text, the map, and a hidden field that contains the free text plus several other fields (WKT, zoom setting, and center). As we add more fields (e.g., base layer for #29), this is going to get harder and harder to maintain.

Instead, there should be an array of hidden fields, one for each field, and they should be stored in the neatline_features table, which currently only stores the is_map setting.

Set the viewport

Allow the user to set and save the viewport of the coverage field.

interaction between selecting features and changing the base layers

From zerocrates on #omeka:

changing the base layer seems to mess things up in some way I can't totally accurately describe

sometimes it kills the red on my selected feature, sometimes i can't then select anything else after i change the layer, sometimes i can't unselect what i already had selected

things seem to work fine if i've never selected anything from the time i load the page to the time i change the layer

but if i've selected something, then unselected it, then change the layer, it gets auto-reselected and can't be unselected

or something like that

Create ItemShow display

Create an itemShow method for displaying items with just NeatlineMaps and NeatlineFeatures.

Set color, width, opacity of features

Allow the user to set the color of features when they're entered or being edited.

David's already added these (and other features that this issue also covers), so part of this will be copying his implementation over. I'll also need to change the internal data format to GML, and use a namespace to encode the view and this information.

Make it possible to pan the map in public item show views

In the public item show view, the map control defaults to a box selection tool that lets you drag out an area on the map. When I hit the page, thought, I wanted to be able to pan the map, not select features.

It could be useful to add a simple control that would let you toggle back and forth. I suspect, though, that in most cases people will want / expect to be able to pan, since that's the default pattern in Google Maps, etc.

Configuration Handling

Right now, configuration is handled by this process:

  • If window.Neatline exists, it's used;
  • Otherwise, the default option handling for widgets is used (passed into initializer and then defaults).

The global options need to be used integrated into the standard configuration processing, so that precedence becomes:

  1. Defaults defined in the widget definition;
  2. window.Neatline; and finally,
  3. options passed into the initializer.

Click-Off before selecting another feature

When editing features, sometimes you have to click off of the currently selected feature before you can select another one. This is unintuitive and needs to be fixed.

Add map show widget to NeatlineFeatures

NeatlineFeatures currently only has an edit widget for editing coverage for an item, but no show widget to display that coverage in a map as well.

Having a show widget would allow us to filter the coverage field on the items/show view, to display a map of the coverage instead of the WKT values.

Map extent can be too close

Right now, the viewport is determined by the features on the map. So if there's only one point, the extent is too close to see where you are or anything on the map.

This could be handled by having a minimum zoom level for the initial extent.

This could also be fixed by implementing #20.

Allow users to upload files of raw data

This will just use the local File API, where it's available, and use the file's contents to populate the raw text area. So it will support whatever data formats entering data into the raw textarea will support (see #13).

What about clobbering existing data?

Also, like entering text directly into the raw textarea, we'll need to prompt for the projection.

Feature modify buttons trigger submit of item form

In FF/Chrome/Safari, clicking on any of the Delete/Drag/Scale/Rotate buttons has the result of submitting the master item edit/create form, which then bounces the user out to the admin/items/show route for the item.

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.