Donate using PayPal

Help

Methods of embedding CycleStreets in other sites

We are able to provided versions of the site that can be embedded within another site.
At present there is a fee for this, to support the ongoing development of CycleStreets and its hosting costs.

In all cases, the hosting and running of the site is done by CycleStreets, not the organisation, as setup would be time-consuming and mean the system goes out of date due to ongoing developments.

There are a number of ways this can be achieved:

Method 1 (Recommended):

http://cyclemap.placeford.org/

Placeford example

Subdomain of your site (or a dedicated domain)

If your organisation's website address is www.placeford.org
then the journey planner would be at e.g. cyclemap.placeford.org

This is the simplest and most flexible way.

Steps:

  1. Contact us to agree arrangements
  2. Decide on the subdomain name, e.g. cyclemap.placeford.org
  3. Login to your domain registrar control panel and create a CNAME of hosted.cyclestreets.net; e.g.:
    cyclemap CNAME hosted.cyclestreets.net.
    (NB some registrars may take an hour to reload such changes.)
  4. Set up a header (example, then view source) and footer (example, then view source) on your server from your CMS. These will be loaded by our server.
  5. Add the subdomain URL to (a) any custom font key you have and to (b) any Access-Control-Allow-Origin list (e.g. for .js files present in the header/footer)
  6. Contact us to let us know the URL, e.g. http://cyclemap.placeford.org/ and the header/footer URLs
  7. We will then add the site to our settings and sort out any customisations and layout fixes
  8. We will confirm when ready to go-live

Method 2 (Recommended):

www.placeford.org/cycling/journeyplanner/

Placeford example

Subdirectory of your site

If your organisation's website address is www.placeford.org
then the journey planner would be at e.g. www.placeford.org/cycling/journeyplanner/

This best from a URL perspective but requires you to run a proxy (which is slightly more technically demanding than Method 1).

This method uses HTTP Proxying to fetch the pages from our servers, even though it appears on your site. If using Apache you will need access to httpd.conf rather than just .htaccess .

Steps:

  1. Contact us to agree arrangements
  2. Decide on where to put the planner within your hierarchy, e.g. /cycling/journeyplanner/
  3. Add the proxy configuration, which references proxied.cyclestreets.net. In this example, /cycling/journeyplanner/ has been used; note carefully the slashes and the need to set .yourdomain.com

    For Apache, in httpd.conf (.htaccess will not work) :

    	# Proxy for externally-hosted CycleStreets journey planner
    	ProxyPass /cycling/journeyplanner http://proxied.cyclestreets.net
    	ProxyPassReverse /cycling/journeyplanner http://proxied.cyclestreets.net
    	ProxyPassReverseCookieDomain .cyclestreets.net .yourdomain.com
    	ProxyPassReverseCookiePath / /cycling/journeyplanner/

    For IIRF for IIS:

    	# Proxy for externally-hosted CycleStreets journey planner
    	RewriteBase OFF
    	RedirectRule ^/cycling/journeyplanner$ /cycling/journeyplanner/
    	ProxyPass ^/cycling/journeyplanner(.*)$ http://proxied.cyclestreets.net$1
    	ProxyPassReverse /cycling/journeyplanner http://proxied.cyclestreets.net
    	# Uncomment these two lines for debugging:
    	# RewriteLogLevel 3
    	# RewriteLog C:\temp\iirf
    	
  4. Set up a header (example, then view source) and footer (example, then view source) on your server from your CMS. These will be loaded by our site.
  5. Contact us to let us know the URL, e.g. http://www.placeford.org/cycling/journeyplanner/ and the header/footer URLs
  6. (Note that we also can support wildcard proxied domains, e.g. http://customer1.placeford.org/cycling/journeyplanner/, http://customer2.placeford.org/cycling/journeyplanner/, etc.)
  7. We will then add the site to our settings and sort out any customisations and layout fixes
  8. We will confirm when ready to go-live

Method 3 (Avoid if possible)

iframe method

We can set up a site which can be loaded in an iFrame. This is reasonably simple at both ends, but has the downside of being unable to have a unique URL for each journey that people can e-mail to others.

This involves the webteam simply creating an iFrame in the relevant part of your site, with the target being a URL that we will set up and confirm.

Steps:

  1. Contact us to agree arrangements
  2. Set up an iframe on your site, e.g. on your cycling pages
  3. Contact us to let us know the URL of the page and the size of the iframe
  4. We will then add the site to our settings and sort out any customisations
  5. We will then confirm our URL to use within the iframe

Method 4 (Advanced)

API calls into your own interface

This is by far the most advanced option and requires programming and much testing from your webteam, and so is not really recommended unless you are prepared to put in ongoing resources.

We have an API which provides a journey solution when provided with the details (start and end points etc.) of a requested journey. This data would need to be captured and then inserted into an interface which you run.

This requires an ongoing commitment to resourcing at your end so that the system keeps pace with any changes to the API we implement.

Steps:

  1. Contact us to agree arrangements
  2. Study the API, including the journey planner and namefinder aspects
  3. Apply for an API key
  4. Implement your interface (warning: could be non-trivial!)
  5. Hook the API into your interface
  6. Ensure your interface includes a license statement:
    Cycle routing provided by CycleStreets uses data (c) OpenStreetMap and contributors (licensed CC-BY-SA).

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * https://glasgow.cyclestreets.net/help/embedding/
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.