UNCLASSIFIED OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E Common Map Widget API DCGS Teams’ Week April, 2014 UNCLASSIFIED OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Agenda D E F E N S E I N T E L L I G E N C E • Background • The API • Current Status • Sample of Who’s Using It • JC2CUI Example • How to Engage I N F O R M A T I O N E N T E R P R I S E OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Background D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E Common Map Widget API (CMAPI) • What is it? – Specification for interwidget communication – Enables Map widgets and data widgets from different programs to interoperate • Where did it come from? – GCCS-I3, JC2CUI, DCGS-IC widget interoperability problem at CENTCOM – Expanded to many programs since • How does it evolve? – Bi-weekly TC meeting – 175 member mailing list – Coordination with OWF • How is it governed – Operating as Open Source project shepherded by DI2E Framework OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Background: Why Do I Care? D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • Cross-vendor interoperability – Widgets from different vendors can interoperate with any map widget “out of the box” • Specialization – Only a few vendors specialize on map widgets – Every one else specialize on data widgets • Competition – Can replace one vendor’s map widget with a different one from another vendor • Agility – Widgets built for one use can be quickly incorporated into new workflows “on the fly” – Compose-able capabilities 4 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: Basic Approach D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • 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 5 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: Architecture View D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N GCCS-I3 Map Widget OpenLayers Library JavaScript Translation Code JC2CUI Map Widget Google Earth Library JavaScript Translation Code Army Map Widget Google Map Library Map Library-Unique APIs (e.g., OpenLayers, GoogleMaps, Proprietary, 6 etc) E N T E R P R I S E Search Widget (from DCGS-IC) Analysis Widget (from Army) SA Widget (from JC2CUI) Intel Widget (from GCCS-I3) JavaScript Translation Code Common Map Widget API – enables widgets from different programs to interoperate with map widgets from different programs All of these widgets can interoperate with any (or all) of the map widgets on the left, due to all implementing a common API (the CMAPI) OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: Summary D E F E N S E – 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 I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E – View • • • • • • 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 7 Will expand these in next few slides OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: Actual Text D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E 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: 8 Data format of the given feature. If no format is specified, the format defaults to “kml.” OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: Actual Text D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E 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: 9 {"location": {"lat": 40.2205, "lon": -74.3579}, "zoom": 70250} OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE The API: in code D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E – 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} }'); 10 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Current Status D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • V1.2.0 available (www.cmapi.org) • V1.2.1 in process – Expect completion mid-Summer – Focusing on user manipulation extensions • Exploring handing off governance to Open Geospatial Consortium • Working with GMU for non-OWF widgets (e.g., HTML5) – GMU will be at Plugfest OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Sample of Who’s Using It D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E – Joint Command and Control Common User Interface (JC2CUI) – Global Command and Control System – Integrated Imagery and Intelligence (GCCSI3 ) – Distributed Common Ground System • Army (DCGS-A) • Intelligence Community (DCGS-IC) – – – – – – – – 12 Defense Intelligence Information Enterprise (DI2E) Framework Army Tactical Mission Command NSA (Red Bridge) NGA (Integrated Analytic Environment (IAE), Geospatial Visualization Services (GVS), others) CIA (Geospatial Tools Program) Navy C2RPC (PEO-C4I/PMW-150) AOC-WS US Coast Guard Adopted by OWF GOSS as OWF related project OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE JC2 CUI Example D E F E N S E Publish map.feature.plot message I N T E L L I G E N C E Receive Publish message. Receive message. map.feature.selected Center on selected Plot tracks on map message track I N F O R M A T I O N Receive Receive message. message. Receive message. Center Center on on selected selected Plot tracks on map track track Receive Publish message. Receive message. map.feature.selected Scroll to selected Show tracks in grid message track 13 E N T E R P R I S E Receive message. Receive message. Center on selected Plot tracks on map track OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE How To Engage D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • Implement the API in your widgets – www.cmapi.org – Where widgets need to display on a map, or if you have a map widget • Join the group – common-map-widget-api@googlegroups.com • Re-use existing products – Map widgets: • Extensible Mapping Platform (EMP) • JC2CUI • Others – CMAPI JavaScript library – CMAPI test widgets – Go to https://storefront.di2e.net/marketplace to access OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Backups D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE How It Came About D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • 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 – E.g., plug and play widgets from DCGS-IC, GCCS-I3, JC2CUI at CENTCOM • The Problem – Map widgets are tightly coupled to query widgets – Interwidget comms (channels) unique to each program • The Solution 16 – Common Map Widget API OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Benefits of CMAPI D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • Cross-vendor interoperability – Widgets from different vendors can interoperate with any map widget “out of the box” • Specialization – Only a few vendors specialize on map widgets – Every one else specialize on data widgets • Competition – Can replace one vendor’s map widget with a different one from another vendor • Agility – Widgets built for one use can be quickly incorporated into new workflows “on the fly” – Compose-able capabilities 17 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Problem Statement D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • Widget-based applications often require a map widget – Interwidget APIs used to “connect” data widgets to map widget are proprietary – Abstractions for map renderer APIs (e.g., mapstraction) are for use within a widget, and not across widgets • Need a vendor-agnostic API to enable interwidget communications – between any vendor’s data widget … – and any other vendor’s map widget 18 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE CMAPI Use Case D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E Browser Disease distribution iFrame iFrame iFrame Search & Select sources Select water sources Analyze and combine Resource allocations iFrame Doctor Reports Map = Not OGC = CMAPI = OGC CSW ESRI Catalog WFS WMS InterMapInfo Graph KML AutoOpenMap Desk KML 19 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Background: OWF D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • 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. – Resembles iGoogle, – Uses Shindig - 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 20 OFFICE OF THE UNDER SECRETARY OF DEFENSE FOR INTELLIGENCE Benefits D E F E N S E I N T E L L I G E N C E I N F O R M A T I O N E N T E R P R I S E • Cross-program interoperability – Widgets from different programs can interoperate with any map widget “out of the box” • Specialization – Only a few programs build map widgets – Every one else focuses on data widgets • Competition – Can replace a map widget with a better one