Embeddable Google Maps building block for displaying markers on the map.
-
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));
-
-
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
-
-
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
-