To embed any page from the red light cameras database into your site,
first go to the page you'd like to embed. If you're embedding the cameras
in a specific city and you'd like to add more surrounding cities, combine
the cities from each URL separated by commas (e.g.
/houston,sugar-land,humble,jersey-village/). Copy the URL, and
?iframe to the end of it. Customize the widget by adding
the following options to the URL:
- The number of pixels you'd like the widget to fill horizontally. Change 360 to the value you'd like to use. Note that if you don't give the entire widget enough height with CSS, a scroll bar will appear, and that will throw everything off. We plan to make the widget automatically set its own height at some point in the future.
- The number of pixels you'd like the map to fill vertically. Change 400 to the value you'd like to use. This only adjusts the map, not the entire widget.
- Only embed the map, not any other data.
Once you've built your URL, add an
iframe tag pointing to that
URL in your page:
<iframe src="your customized URL here" style="border: none; width: 360px; height: 400px" frameborder="0"></iframe>
Replace the 360px width with the value you chose earlier, and choose a height value that will fit the entire widget.
<iframe src="http://www.texastribune.org/library/data/red-light-cameras/houston,sugar-land,humble,jersey-village/?iframe=&width=360&map_only&map_height=300" style="border: none; width: 360px; height: 400px" frameborder="0"></iframe>
Yeah, it's a little complicated for now. Sorry.