Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

made it pretty

  • Loading branch information...
commit 90e696cc1501782becce6c05560048d76febf850 1 parent 58f3df8
Massimiliano Marcon authored
View
48 css/style.css
@@ -14,13 +14,26 @@
* limitations under the License.
*/
-@import url(http://fonts.googleapis.com/css?family=Londrina+Outline|McLaren);
+@import url(http://fonts.googleapis.com/css?family=Graduate);
body {
- font-family: 'McLaren', cursive;
+ font-family: 'Graduate', cursive;
font-weight: 100;
font-size: 14px;
background-color: #fff;
+ color: #222;
+}
+
+header {
+ background-color: #222;
+ padding: 10px 0;
+}
+
+h1 {
+ font-family: 'Graduate', cursive;
+ font-size: 30px;
+ text-align: center;
+ color: #afeeee;
}
h2 {
@@ -55,4 +68,35 @@ a:hover {
border: 10px solid #fff;
box-shadow: 0 0 8px #ccc;
border-radius: 4px;
+}
+
+a.hm:link,
+a.hm:visited {
+ width: 100px;
+ height: 100px;
+ border-radius: 50px;
+ background-color: #ff6347;
+ display: block;
+ line-height: 100px;
+ text-align: center;
+ color: #222;
+ font-size: 24px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin-top: -50px;
+ opacity: 0.8;
+}
+
+a.hm:hover,
+a.hm:active {
+ opacity: 1;
+}
+
+.density {
+ margin-left: -400px;
+}
+
+.value {
+ margin-left: 300px;
}
View
BIN  img/circle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
12 index.html
@@ -18,25 +18,23 @@
<html lang="en">
<head>
<meta charset="utf-8" />
- <title>Find your Tile</title>
+ <title>Neighborhood Hangouts</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<header>
- <h1>Where is Everybody</h1>
+ <h1>Neighborhood Hangouts</h1>
<h2>Powered by <a href="http://api.maps.nokia.com" title="Nokia Maps API">Nokia Maps</a></h2>
</header>
<ul>
- <li><a href="#" class="density">In what area your neighbors hang out the most</a></li>
- <li><a href="#" class="value">In what place your neighbors hang out the most</a></li>
+ <li><a href="#" class="density hm" title="In what area your neighbors hang out the most">Area</a></li>
+ <li><a href="#" class="value hm" title="In what place your neighbors hang out the most">Place</a></li>
</ul>
- <section id="map">
-
- </section>
+ <section id="map"></section>
<script type="text/javascript" src="http://api.maps.nokia.com/2.2.3/jsl.js?with=all"></script>
<script type="text/javascript" src="js/main.js"></script>
View
12 js/main.js
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-(function(doc){
+(function(doc, nokia){
'use strict';
var init, locationFound, locationNotFound, cities, attachEventHandlers, dataReady,
@@ -47,11 +47,13 @@
nokia.maps.util.ApplicationContext.set({"appId": API.id, "authenticationToken": API.token});
map = new nokia.maps.map.Display(mapEl,
{center: [lat, lon],
- zoomLevel: 16,
+ zoomLevel: 17,
components:[
new nokia.maps.map.component.ZoomBar()
]});
map.set("baseMapType", nokia.maps.map.Display.SMARTMAP);
+ map.set("maxZoomLevel", 18);
+ map.set("minZoomLevel", 16);
jsonp = doc.createElement('script');
doc.querySelector('head').appendChild(jsonp);
@@ -65,7 +67,7 @@
};
locationNotFound = function(){
-
+ console.log('No location');
};
dataReady = function(data) {
@@ -115,7 +117,7 @@
doc.querySelector('ul').addEventListener('click', function(e){
e.preventDefault();
if(e.target.tagName.match(/a/i)) {
- if(e.target.classList+'' === 'value') {
+ if(e.target.classList.contains('value')) {
map.overlays.remove(density);
map.overlays.add(value);
} else {
@@ -132,5 +134,5 @@
else {
window.onload = init;
}
-})(document);
+})(document, nokia);
Please sign in to comment.
Something went wrong with that request. Please try again.