From b12645f92322ac2587a5a915a9208eff77b28b5d Mon Sep 17 00:00:00 2001 From: Geoff Jacobsen Date: Wed, 8 Jul 2020 15:04:55 +1200 Subject: [PATCH] feat(landing): Add content to contact us mailto: link See https://confluence.linz.govt.nz/pages/viewpage.action?spaceKey=LTS&title=Contact+us+-+basemaps --- packages/landing/src/ui.ts | 23 +++++++++++++++++++++++ packages/landing/static/index.html | 3 +-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/landing/src/ui.ts b/packages/landing/src/ui.ts index b1424ebd39..81bf558d4f 100644 --- a/packages/landing/src/ui.ts +++ b/packages/landing/src/ui.ts @@ -23,6 +23,7 @@ export class BasemapsUi { this.bindProjectionButtons(); this.bindApiLinks(); this.bindMenuButton(); + this.bindContactUsButton(); this.setCurrentProjection(this.basemaps.config.projection); } @@ -43,6 +44,28 @@ export class BasemapsUi { this.sideNav = sideNav; } + bindContactUsButton(): void { + const button = document.getElementById('contact-us'); + if (button == null) { + throw new Error('Unable to find contact-us button'); + } + + button.onclick = () => { + const subject = 'Request Basemaps Developer Access'; + const body = ` +Give us a few key details to sign up for Developer Access to LINZ Basemaps. We will respond with your Apps' unique API key. + +Your Name: + +Your Email: + +Your Service/App URL: + +`; + location.href = `mailto:basemaps@linz.govt.nz?subject=${encodeURI(subject)}&body=${encodeURI(body)}`; + }; + } + menuOnClick = (): void => { if (this.sideNav.classList.contains('side-nav--opened')) { gaEvent(GaEvent.Ui, 'menu:close', 1); diff --git a/packages/landing/static/index.html b/packages/landing/static/index.html index 8b10b349d1..59cadcbad0 100644 --- a/packages/landing/static/index.html +++ b/packages/landing/static/index.html @@ -156,8 +156,7 @@
Get an API Key
Developer Access

Contact us for free API keys with better support for public web and mobile apps.

- +
About basemaps