Common Map Widget API v13 - C4I Center

advertisement
Defense Information Systems Agency
A Combat Support Agency
Common Map Widget API
June 05, 2013
A Combat Support Agency
•
•
•
•
Agenda
Background
The API
Current Status
Implementation Example (picture only)
2
A Combat Support Agency
Background: OWF
• Widgets: web pages or apps contained in an iframe, often
used to provide views of dynamic content
• Ozone: combination layout manager and messaging
mechanism for hosting widgets within a Web browser.
– It resembles iGoogle, and uses Shindig, an open source Google
gadget (widget) container.
• Because browsers don't permit communication between
iframes from different domains, Ozone also provides crossdomain-compatible pub-sub mechanism.
– Enables development of Web apps composed of multiple
intercommunicating widgets.
• OWF = Ozone Widget Framework: in wide use across
DoD/IC programs
3
A Combat Support Agency
Background
• Current Users:
– Joint Command and Control Common User Interface (JC2CUI)
– Global Command and Control System – Integrated Imagery and Intelligence
(GCCS-I3)
– Distributed Common Ground System – Intelligence Community (DCGS-IC)
– Defense Intelligence Information Enterprise (DI2E) Framework
– Army Tactical Mission Command
– NSA
• Other Prospective Partners:
–
–
–
–
Navy C2RPC (PEO-C4I/PMW-150)
AOC-WS
US Coast Guard
CIA
Adopted by OWF GOSS as OWF related project
4
Background
A Combat Support Agency
• A Common Pattern
– Widgets query for or manipulate data
– Map widget displays results
• The Vision
– Mix and match query widgets and map widgets from different
programs
– I.e., plug and play
• The Problem
– Map widgets are tightly coupled to query widgets
– Interwidget comms (channels) unique to each program
• The Solution
– Common Map Widget API
5
A Combat Support Agency
First Principles
• First principle of design patterns:
program to an interface, not an
implementation
• From Design Patterns: Elements of Reusable ObjectOriented Software by the "Gang of Four”
6
A Combat Support Agency
The API (Basic Approach)
• Identify basic map operations
• Abstract operations away from any physical map
• Define channels and messages, and associate
with basic map operations (i.e., the API)
• Any widget can subscribe to map channels and
react appropriately
– not just a map
• Don’t tie API to any particular implementation or
map renderer
– e.g. Google Earth, OpenLayers
7
A Combat Support Agency
The API (Conceptual View)
Map Widget “container”
OpenLayers
Library
JavaScript
Translation Code
Map Widget “container”
Google Earth
Library
Search
Widget
JavaScript
Translation Code
Analysis
Widget
SA
Widget
Intel
Widget
Map Widget “container”
Google Map Library
Map Library-Unique APIs
(e.g., OpenLayers,
GoogleMaps, Proprietary, etc)
JavaScript
Translation Code
Common Map Widget API – enables
widgets from different communities to
interoperate with different maps
8
The API (summary)
A Combat Support Agency
– View
– Overlays
•
•
•
•
•
map.overlay.create
map.overlay.remove
map.overlay.hide
map.overlay.show
map.overlay.update
– Features
•
•
•
•
•
•
•
map.feature.plot
map.feature.plot.url
map.feature.unplot
map.feature.hide
map.feature.show
map.feature.selected
map.feature.update
•
•
•
•
•
•
map.view.zoom
map.view.center.overlay
map.view.center.feature
map.view.center.location
map.view.center.bounds
map.view.clicked
– Status
•
•
•
•
map.status.request
map.status.view
map.status.format
map.status.about
– Errors
• map.error
– Drag And Drop
Will expand these in next few slides
9
A Combat Support Agency
The API (Actual Text)
Plot URL
Purpose:
Have the map plot feature data from a Uniform Resource Locator (URL).
Channel:
map.feature.plot.url
Payload:
{overlayId: (optional), featureId: (required), featureName:
(optional), format: (optional), url: (required), zoom:
(optional)}
overlayId:
The id of the overlay this feature should be loaded into. If overlay with this id already
exists, new feature is merged into existing overlay; otherwise, new overlay will be
created. If no overlayId is included, default overlay with id equal to sending widget's id is
used. If overlay exists, it will retain its status (whether visible or hidden). If overlay is
created, it will be made visible.
featureId:
Unique identifier for the given feature data. Note that feature ids must be unique within
a given overlay. Reusing a feature id will be considered a reload, with the original
feature data being removed and replaced by the new feature data.
featureName: Name for the given feature data. Note that feature names do not have to be unique and
are intended for display purposes only.
format:
Data format of the given feature. If no format is specified, the format defaults to “kml.”
10
A Combat Support Agency
The API (Actual Text)
Center on Location
Purpose:
Center the map on a particular location. The map may also be zoomed as close as
possible to the location or to a given range.
Channel:
map.view.center.location
Payload:
{location: {lat: (required), lon: (required)} (required), zoom:
(optional)}
location:
Location to be centered in map.
lat:
The latitude value of the point.
lon:
The longitude value of the point.
zoom:
If “auto,” map will adjust to zoom in to the given location as close as possible in the
user's viewable area.
If a number, map will zoom to specified range in meters.
If no zoom attribute is included, no zoom is performed.
Example:
{"location": {"lat": 40.2205, "lon": -74.3579}, "zoom": 70250}
11
A Combat Support Agency
The API (in code)
– Load kml feature data onto map
widgetEventingController.publish('map.feature.plot.url', '{
"featureId": “SAGE_PUBLIC",
"url":
"https://sageearth.northcom.mil/arcgisserver/public/SAGE_link.kml"
}');
– Center Map on Location (pan)
widgetEventingController.publish('map.view.center.location', '{
"location": {"lat": 40.2205, "lon": -74.3579}
}');
12
A Combat Support Agency
Current Status
• Current spec (v1.1)
– Requires KML and WMS (getMap)
– Signed off early 2013
– Growing community of adopters
• Next version (v1.2)
–
–
–
–
–
Ambiguity fixes
User manipulation support
Optional extensions (e.g., widget intents, clustering)
Considering GeoJSON
Growing community of participants
13
A Combat Support Agency
Common Map Widget API
• Implementations:
– JC2CUI – Reference Map Widget. Pluggable architecture, supports
dynamically selected map renderer. JavaScript library can be reused for
any desired renderer. Current implementations include Google Maps
API version 2, Google Maps API version 3, Google Earth Plugin,
OpenLayers 2.12.
– Army – Google Earth Plugin based Map Widget with Army extensions.
JavaScript wrapper library can be reused for any desired renderer.
NASA World Wind implementation under development.
– GCSS-I3 – NASA World Wind and Open Layers based implementations
14
A Combat Support Agency
Publish
map.feature.plot
message
JC2 CUI Example
Receive
Publish
message.
Receive message.
map.feature.selected
Center on selected
Plot tracks on map
message
track
Receive
Receive message.
message.
Receive message.
Center
Center on
on selected
selected
Plot tracks on map
track
track
Receive message.
Receive message.
Center on selected
Plot tracks on map
track
Receive
Receive
Publish
message.
map.feature.selected
message.
Scroll to selected
Show
tracks
message
track
in grid
15
A Combat Support Agency
Additional Information
• More Information:
– Common Map API Group:
https://groups.google.com/forum/?fromgroups#!forum/common-map-widget-api
– Common Map API Wiki:
https://intellipedia.intelink.gov/wiki/Common_Map_Widget_API_Committee
• POCs for additional info:
–
–
–
–
Ken Trabue - kenneth.m.trabue.civ@mail.mil
Stephen Lubowsky - slubowsky@eoir.com
Marty Dowd - martin.j.dowd.ctr@mail.mil
Chris Bashioum – cbashioum@mitre.org, bashiouc@nro.ic.gov
16
Download