Tech part: How to install it

What is it
How to install
Example

Note: this is somewhat tech oriented specification about installing the widgets. It requires basic html skills and access to your server and pages. If you don't understand it, give it to your nearest technical support guy. The installation shouldn't be so hard, though...

What you need

  1. A Google Maps api key (marked as API_KEY below) dedicated for your site. You will get it here.
  2. A page where you have an empty space about 500-700px wide
  3. The destination name accessible from the html page (marked as DESTINATION below). If you want to have multiple destinations (several destinations on several pages) you have to have the string dynamically available on the page. See the destination name format.
  4. A Javascript-code which you will get next

Destination name format

We have tried to collect a lot of exonyms (aliases) of our destinations. It means that we accept as well 'venice' and 'venezia'. Still, it might be possible that we don't have the name in your language if that's not english.

The widget title

We would appreciate if the site using our widget would somehow indicate that the content comes from us! The partner can choose the most suitable way for doing that. We would recommend a header, which is also an easy way of separating the widget part from the rest of the content on a destination page. Here's an easy example, how to do it in a stylish way!

<h2>
   <span style="float: right; font-size: 10px; font-variant: small-caps;">
     powered by: <a href="http://www.tripsay.com"> TripSay </a>
   </span>
   Destination tips
</h2>

A) Javascript when you can include destination name dynamically

<script src="http://maps.google.com/maps?file=api&v=2.x&key=API_KEY" type="text/javascript"></script>
<script type="text/javascript" src="http://www.tripsay.com/partner/widget/destination/DESTINATION"></script>

B) When you can't include destination name dynamically

Well, this is more tricky. Basically you need to get the destination name SOMEHOW. One place where to usually get it from is the URL. Here is a short example of how you will get the name from url, if it's in format

http://www.yoursite.com/some/paths/before/the/name/venice/

Sadly we don't have the resources to support you here so you are pretty much on your own with this. :(

Example

<script src="http://maps.google.com/maps?file=api&v=2.x&key=API_KEY" type="text/javascript"></script>
<script type="text/javascript">

     var d = window.location.href;
     d = d.substring( d.lastIndexOf('/') + 1 );
     document.write('<scri'+'pt type="text/javascript" ' +
     'src="http://www.tripsay.com/partner/widget/destination/' + d + '"></scr' + 'ipt>');

</script>