{"surface":{"slug":"widget-wrapper","title":"mGIS integrated widget wrapper","stateModel":"browser-runtime","readiness":"entitlement-required","summary":"Mount an entitled MGIS.Widget map/workview surface with 2D or 3D view, basemap selection, and basic map controls.","durableIdentity":"Tenant/workspace plus approved workViewName and application-owned embedding record","credentialBoundary":"The official option is widgetKey and describes it as an access token. It is browser-visible. Use only the credential class, origin restrictions, lifetime, and tenant scope approved for this wrapper; never substitute a server secret.","sourceLabels":["Official mGIS Widgets","Public widget repository"],"sourceUrls":["https://developer.mappls.com/analytics/mgis-widgets","https://github.com/mappls-api/mapmyindia-mgis-libraries"],"evidenceBoundary":"The official page lists Map View 2D/3D, Workview, Basemap Option, and Basic Map Tools and documents MGIS.Widget(container, options). The public repository supplies the hosted widgets.js URL and additionally describes 3D Landmark, Real View, and Tour; those extra families require current contract confirmation."},"method":null,"readiness":"source-ready-after-entitlement","samples":[{"language":"html","label":"Host shell","code":"<script src=\"https://mgis.mappls.com/mGIS_widgets/widgets.js\"></script>\n<div id=\"mgis-widget\" style=\"height: 600px; width: 100%;\" aria-label=\"mGIS workview\"></div>"},{"language":"javascript","label":"Entitled wrapper","code":"const options = {\n  widgetName: \"map-widget\",\n  widgetKey: \"YOUR_ENTITLED_MGIS_WIDGET_KEY\", // browser-visible; never a server secret\n  widgetOptions: {\n    mapViewMode: \"2d\",\n    defaultBaseMap: \"mmi-raster\",\n    defaultView: { center: [28.7041, 77.1025], zoom: 12 },\n    mapControls: true,\n    workViewName: \"approved-workview\",\n  },\n};\n\nconst widget = new MGIS.Widget(\"mgis-widget\", options);\nwidget.init();\n\n// Keep the instance in one host lifecycle owner. Confirm the contracted\n// dispose/event API before adding cleanup or business-state callbacks."},{"language":"text","label":"Browser policy","code":"Content-Security-Policy: script-src 'self' https://mgis.mappls.com; connect-src 'self' https://mgis.mappls.com; img-src 'self' data: https://mgis.mappls.com;\n\n# Expand only from an approved browser trace and enterprise contract."}],"lifecycle":[{"state":"selected","owner":"Product and workspace owner","proof":"Surface, account/tenant, region, entitlement, data class, and source contract are approved."},{"state":"configuring","owner":"Application adapter","proof":"One bounded configuration references stable workspace/dataset/workview identity and no server secret enters the browser."},{"state":"active","owner":"Host lifecycle","proof":"One instance or job owns listeners, requests, cancellation, retries, and observable health."},{"state":"candidate","owner":"Application domain","proof":"Provider output is schema-checked and normalized; it has not silently replaced durable state."},{"state":"committed","owner":"Application repository","proof":"A versioned record binds actor, source, provider identity, input revision, and event."},{"state":"retired / disposed","owner":"Application and workspace administrator","proof":"Runtime resources are released; durable datasets, lineage, permissions, and audit follow policy."}],"stateOwnership":["Tenant/workspace plus approved workViewName and application-owned embedding record","The official option is widgetKey and describes it as an access token. It is browser-visible. Use only the credential class, origin restrictions, lifetime, and tenant scope approved for this wrapper; never substitute a server secret.","Provider UI/runtime is never the application database; persist normalized identities, versions, receipts, and lineage outside the browser instance.","A load, callback, tile, legend, or image proves only that observable event. Publication, analysis completion, sharing, and export require their own durable evidence."],"releaseTests":["Issued tenant, region, dataset, method, and credential class","Allowed and denied browser origins plus CSP","Slow, offline, quota, expired entitlement, and revoked access","Duplicate initialization, late callback, unmount, and browser back/forward cache","Dataset/style/workview version drift","Accessibility and non-map representation","Idempotency, expected version, unknown outcome, and reconciliation","Privacy, export, share, retention, audit, and deletion policy"],"warnings":["The official page lists Map View 2D/3D, Workview, Basemap Option, and Basic Map Tools and documents MGIS.Widget(container, options). The public repository supplies the hosted widgets.js URL and additionally describes 3D Landmark, Real View, and Tour; those extra families require current contract confirmation.","Examples are configuration/adapter contracts with placeholders. They do not claim a live entitlement or unlisted endpoint."],"evidence":[{"label":"Official mGIS Widgets","url":"https://developer.mappls.com/analytics/mgis-widgets"},{"label":"Public widget repository","url":"https://github.com/mappls-api/mapmyindia-mgis-libraries"}],"websiteUrl":"/tools/mgis?surface=widget-wrapper"}