## -*- coding: UTF-8 -*- <%inherit file="/layout.html" /> <%def name="stylesheet_links()"> ${h.stylesheet_link_tag('tab-control.css')} ${h.stylesheet_link_tag('fixed-pane.css')} <%def name="input_container()"> <%call expr="parent.input_container(classes=['tab-control'])">
${h.form(h.url_for('/regions/%s/services/find' % c.region.slug), method='get', id='query_form')}
${h.text_field('q', id='q', value=c.q, title='Enter an address or route', tabindex='1')} ${h.submit(value='Search Map', title='Click to search the map', tabindex='2')}
Enter an address or intersection -OR- pick a location from the map.
${h.end_form()}
${h.form(h.url_for('/regions/%s/routes/find' % c.region.slug), method='get', id='route_form')}
${h.text_field('s', id='s', value=c.s, title='Enter start address', tabindex='3')} «-» ${h.text_field('e', id='e', value=c.e, title='Enter end address', tabindex='5')} ${self.route_pref()} ${h.submit(value='Find Route', title='Click to find a route', tabindex='9')}
Enter your start and end addresses and, optionally, select a route type.
${h.end_form()}
<%def name='route_pref()'> % if c.region.slug == 'portlandor': % endif <%def name="links()"> Link to last result <%def name="result_pane()"> <%call expr="parent.result_pane(classes=['tab-control'])">
% if c.service == 'geocodes' and c.http_status == 200:
${self.json()} ${self.body()}
% endif
% if c.service == 'routes' and c.http_status == 200:
${self.json()} ${self.body()}
% endif

Disclaimer: As you are riding, please keep in mind that you don't have to follow the suggested route. It may not be safe at any given point. If you see what looks like an unsafe or undesirable stretch in the suggested route, you can decide to walk, ride on the sidewalk, or go a different way.

Users should independently verify all information presented here. This service is provided AS IS with NO WARRANTY of any kind.

<%def name="map_controls()">
<% region_ns = self.get_namespace('/regions/%s.html' % c.region.slug) %> % if hasattr(region_ns, 'map_controls'): ${region_ns.map_controls()} % endif
<%def name="javascript_includes()"> <% js = ('services', 'query', 'result', 'widgets/tab_control', 'widgets/fixed_pane') %> ${h.javascript_include_tag(*js)} <%def name="javascript()"> byCycle.UI.service = '${c.service}'; byCycle.UI.member_name = '${c.member_name}'; byCycle.UI.collection_name = '${c.collection_name}'; byCycle.UI.region_id = '${c.region.slug if c.region else ""}'; byCycle.UI.http_status = ${'%i' % c.http_status if c.http_status else 'undefined'}; byCycle.UI.q = '${c.q}'; <%def name="json()"> % if c.format != 'json': ${h.hidden_field(None, value=c.json, class_='json')} % endif