Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

Customization

Matt Conway edited this page Jan 27, 2012 · 6 revisions

Customizing the Page Layout/Fonts/Other Non-Map Elements

All of these elements can be customized using CSS. The following image shows the CSS classes of various elements: CSS Classes for Customization

Also, there are two pseudo-classes available, map-walk-color and map-transit-color, which control the color and opacity of the trip overlay.

Customizing the Basemap

Customizing the Basemap is easy using CloudMade. Just find or create an OpenStreetMap style you like, publish it, and punch in its ID. For help creating a CloudMade style, you might want to view their screencast.. You won't need an API key; you can simply copy the ID of the style (the number found, among other places, in the style editor URL and in the lower-right corner of the style browser) into the config tool.

Alternately, you can specify an alternate tile URL and attribution. You can use either pre-generated tiles such as the ones on tile.openstreetmap.org or the MapQuest API, or you can create your own style using any software and data you like, and make it available as a Tiled Map Service (keep in mind that caching every tile for the Portland area takes up 2+ GB of disk space; you'll probably want to investigate a solution that caches the lower zoom levels and renders the upper levels dynamically). If you'd like to use a WMS instead, tying that in shouldn't be too hard but will require some code modifications.

Customizing the Destinations

Many Portland-area destinations are already in the destinations database. If there is a destination you would like to add, please contact me. In general, I'll add destinations if they:

  • Are easily accessible from MAX or a Frequent Service bus line, which are the only services Transit Board Hotel will route on.
  • Have Creative Commons photography available.

Running your own database is possible but somewhat involved and not really recommended. If you really think you want to do this, drop me a line and I can go into more depth.

Customizing the Transit Overlay

The transit overlay is the hardest part to customize. It is generated using the gis/trimet.xml file and the TriMet shapefiles, and rendered to tiles using Mapnik and a customized version of the OSM tile generator. Since most of the tiles are blank, a full tileset comes in under 25 MB. You can edit gis/trimet.xml to customize, and run generate_tiles.py to generate new tiles.

CC-BY 3.0 by Portland Transport.