dirigiblelabs / building-blocks-map

Building Blocks - Map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building Blocks - Map

Dirigible Version Run on Dirigible

Overview:

Embeddable Google Maps building block for displaying markers on the map.

Setup:

  1. Retrieve Addresses

    • Update building-blocks-map/api/addresses.js:

      var response = require("http/v3/response");
      var query = require("db/v3/query");
      
      var sql = "SELECT ADDRESSLINE1, CITY from USER_ADDRESSES";
      
      var addresses = query.execute(sql).map(e => {
      	return {
                  address: e.ADDRESSLINE1,
          	    city: e.CITY
      	};
      });
      
      response.println(JSON.stringify(addresses));
  2. Embed into existing application

    • Update building-blocks-map/ui/Map/extensions/view.extension:

      Extension Point = <your-application-extension-point> // e.g: launchpad-demo-Users-view
      
  3. Provide Google API Key

    • Update building-blocks-map/ui/Map/index.html:

      <script async defer src="https://maps.googleapis.com/maps/api/js?callback=initMap&key=YOUR-API-KEY"></script>

      Where e.g: YOUR-API-KEY = BI2aXyCk0xMMEr2LxUYjD73weVv4hQVXD2oPw4q

About

Building Blocks - Map

License:Eclipse Public License 1.0


Languages

Language:HTML 65.2%Language:JavaScript 34.8%