Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Google maps APi and JavaScript

Featured Replies

Hello everyone,

 

Some time ago I created a website for the family business. On this page http://www.crawfordandson.co.uk/map.html is a map giving directions to our premises. It uses the Google maps Api.

 

My problem is this; currently you type in your post code or whatever and the click the get direction button to generate a route. I would like to also give directions from set locations on the map, for example the local train station. The locations would be activated by pushing the button marked “nearest train station” etc. A route would then be generated from that location to our premises.

 

It’s obvious that it can be done, pushing the button would trigger an event where a set of co-ordinates are loaded and a route generated to the destination co-ordinates.

 

My knowledge of JavaScript is not yet good enough to code it. Does anybody else know? I'm looking for about 4 buttons in total that I can set up with any co-ordinates I choose.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.