User Tools

Site Tools


building

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
building [2014/09/02 14:09]
cruisefactory [Port latitude & longitude Google maps]
building [2018/08/31 17:26] (current)
cruisefactory
Line 206: Line 206:
   http://images.cruisefactory.net/eflyer/1111111.pdf   http://images.cruisefactory.net/eflyer/1111111.pdf
 would fetch the eflyer PDF for the special ID 1111111. would fetch the eflyer PDF for the special ID 1111111.
 +
 +
 +
 +
 +===== Autoflyer Retrieval =====
 +To download a special auto-flyer use the following URL:
 +  http://images.cruisefactory.net/autoflyer.html?special_id=[SPECIAL_ID]&sailingdate=[YYYY-MM-DD]
  
  
Line 267: Line 274:
 The latitude and longitude coordinates are now included for each port within the Cruise Factory database. You can [[structure#latlong|view the structure of the table here]]. The latitude and longitude coordinates are now included for each port within the Cruise Factory database. You can [[structure#latlong|view the structure of the table here]].
  
 +To access a coordinate of a port you will need to have both the `ports` and `latlong` tables imported successfully. They will then link together via the `ports.id` and `latlong.port_id` columns.
 +
 +For example, to retrieve all ports with their corresponding lat/long coordinates you could run a query as such:
 +
 +<code sql>
 +SELECT
 + ports.*,
 + latlong.lat,
 + latlong.long
 +FROM
 + ports,
 + latlong
 +WHERE
 + ports.id=latlong.port_id
 +</code>
 ==== Google maps ==== ==== Google maps ====
 As a suggested usage for the new port coordinates we recommend using [[https://developers.google.com/maps/documentation/javascript/tutorial|Google Maps Javascript API]] for creating an interactive map of the selected port for your site visitors. As a suggested usage for the new port coordinates we recommend using [[https://developers.google.com/maps/documentation/javascript/tutorial|Google Maps Javascript API]] for creating an interactive map of the selected port for your site visitors.
 +
 +If you follow the tutorial at the link above you will have an API key to access the Google API for you own site. You will then be able to generate maps that display your selected ports using the Cruise Factory provided latitude/longitude coordinates by editing this in your Google map javascript:
 +
 +<code javascript>
 +var mapOptions = {
 + center: new google.maps.LatLng(-34.397, 150.644),
 + zoom: 8
 +};
 +</code>
 +
 +By entering in (dynamically) the lat & long of the port into the above you will find that the map automatically centers on the location of the port in your Google map widget.
 +
 +Read the [[https://developers.google.com/maps/documentation/javascript/tutorial|Google Maps JavaScript API]] for more details on how to customize your maps.
 +
 +==== Amended Conditions ====
 +Cruise lines may require specific conditions and disclaimers for the bookings and pricing. We have a table named ''amended_conditions'' which will give you the details required by the cruise line for display on your site. Currently on a per sailing date basis, we provide the pricing disclaimer and terms & conditions text that must be displayed.
 +
 +As above the required table name is ''amended_conditions'' which has 3 fields of interest:
 +  * **''sailingdate_id''**
 +    * This will link to the current sailing:
 +    * ''sailingdates.id = amended_conditions.sailingdate_id''.
 +  * **''disclaimer''**
 +    * This text must be displayed. Suggested under the pricing.
 +  * **''conditions''**
 +    * This text must be displayed.
 +    * Will usually be much longer text and should be displayed under a "Terms & Conditions" heading.
building.1409630980.txt.gz ยท Last modified: 2014/09/02 14:09 by cruisefactory