dankeemahill / naco

Border cities quiz game built for Migrahack
http://danhillreports.github.io/naco/
2 stars 0 forks source link

showInfo function tweaks #11

Open wilbertom opened 11 years ago

wilbertom commented 11 years ago

The CityContentView view is a wrapper around the previous way of rendering city ```

template: _.template('\
        <h3><%= cityData.title %></h3>\
        <h5><%= cityData.geography %></h5>\
        <div style="font-size:12px">\
            <span>\
                Population:\
            </span>\
            <%= cityData.population %> \
            </br>\
            <span>\
                High school graduates:\
            </span>\
            <%= cityData.graduates_percent %>\
            </br>\
            <span>\
                Unemployment rate:\
            </span> \
                <%= cityData.unemployment_percent %>\
            </br>\
            <span>\
                GDP per capita:\
            </span>\
            <%= cityData.gdp %>\
            </br>\
        </div>')

The classes good and bad need to be added again. I couldn't do this my self because I don't know the criteria used to distinguish between the two. After defining we could add some conditionals to dynamically choose span classes.

Also the:

var juarezLoc = new google.maps.LatLng(31.58847937271219, -106.60514831542969); // are these the citie's coordinate? if so we can use the paso.plot() method

and :

    var pasoLoc = new google.maps.LatLng(31.693119,-106.316285); // are these the citie's coordinate? if so we can use the paso.plot() method

lines are plotting the content views. If the latitudes and longitudes are the same as the city's lat and longs then we could use the new CityModel.plot() method for example:

var pasoLoc = paso.plot();
dankeemahill commented 11 years ago

The juarezLoc and pasoLoc variables determine where the InfoWindows appear. I selected those coordinates by hand so that they would both appear nicely in the map canvas. But there must be a better way...

good and bad I determined by greater than/less than comparisons, so that could be added again.