You must provide the body of rendertile to draw

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ou must provide the body of renderTile() to draw things nicely. How elaborate you want to get with your rendering is up to you. We appreciate interesting refinements to your rendering algorithm, which make your tiles "prettier" in any way. You should document any extensions or tweaks you make here. At minimum, your renderer must do the following: • Render all roads and highways at low zoom levels • Render major highways at farther-out zoom levels • Make a reasonable effort to abstract away densely-developed areas at high zoom levels (e.g., render "some roads," make roads fade into the background, etc, so that Seattle appears neither a solid mass of black when zoomed out, but nor is it just the intersection of 520 and I-5) • Do a "best effort" to draw polygon objects (see below) at all zoom levels • Place labels on top of the tiles so they are legible Label Placement Label placement is a difficult problem (optimum label placement is, in fact, NPComplete). You must draw labels on your maps. You must invent an algorithm to place labels "reasonably." How you do this is up to you. Document this thoroughly in your writeup, and defend why it is a reasonable algorithm. Your algorithm should follow these guidelines: • At each zoom level, "appropriate" labels should be shown (surface roads at low zoom levels, cities at farther-out zoom levels, etc) • Labels should be legible (they should not be hard to read because of lines or polygons underneath of them; they should not overlap one another, etc • When labels might overlap or otherwise conflict, employ a conflict resolution strategy ◦ Bigger cities should take priority over smaller cities • Labels should not overly clutter your map ◦ At wider zoom levels, do not draw a label for every surface road; "some roads" is a good idea (how do you choose which roads?) ◦ Don't draw an excessive number of the same label (i.e., don't relabel I-5 every 25 pixels) ◦ Labels should be chosen so they are relatively uniformly distributed across the tile (don't have 30 labels all in the corner) • Font sizes chosen for labels should reflect the stature of the object they represent (cities should have more prominent labels than roads; larger cities should have more prominen...
View Full Document

Ask a homework question - tutors are online