Google Maps Embed plugin

This plugin allows a user to embed a map into a story.

Right now it will only support one point per map.

Plugin configuration

{
  "id": "io.infomaker.mapembed",
  "name": "im-mapembed",
  "url": "https://plugins.writer.infomaker.io/v1/infomaker/im-mapembed/{PLUGIN_VERSION}/index.js",
  "style": "https://plugins.writer.infomaker.io/v1/infomaker/im-mapembed/{PLUGIN_VERSION}/style.css",
  "enabled": true,
  "mandatory": false,
  "data": {
    "googleMapsApiKey": "Your API Key",
    "initialZoom": 7,
    "initialLocation": {
        "lat": "56.68542669999999",
        "lng": "16.288760899999943"
    }
  }
}

Options

Property Type Required Description
googleMapsApiKey String true Needed for embedding the Google Maps API, see this link
initialZoom Integer false Initial zoom level, between 1 and 20, when a new map is added, default value is 7
initialLocation Object false Object with format {lat: string, lng: string}, coordinates for initial position when map is added. Default value is somewhere in Sweden

Output

In the article, the plugin will add an XML block in newsItem > contentSet > inlineXML > idf > group:

Example:

<object id="MTA1LDIwMiw3LDk0" type="x-im/mapembed">
    <data>
        <zoom>11</zoom>
        <geometry>POINT (16.35677910000004 56.6634447)</geometry>
    </data>
</object>