Skip to content

Commit

Permalink
Merge branch 'tirejs'
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarcon committed Mar 10, 2013
2 parents d9aa8a9 + bd4d247 commit 7626ce3
Show file tree
Hide file tree
Showing 5 changed files with 436 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Expand Up @@ -3,7 +3,8 @@
"globals": {
"jQuery": true,
"nokia": true,
"Zepto": true
"Zepto": true,
"tire": true
},

"browser": true,
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -8,14 +8,17 @@ RUNNER = test/SpecRunner.html
deps:
@npm install

dist: hint plugin zepto extensions summary
dist: hint plugin zepto tire extensions summary

plugin:
@./node_modules/.bin/uglifyjs -nc -o dist/$(PLUGIN).min.js src/$(PLUGIN).js

zepto:
@./node_modules/.bin/uglifyjs -nc -o dist/zepto.adapter.min.js src/zepto.adapter.js

tire:
@./node_modules/.bin/uglifyjs -nc -o dist/tire.adapter.min.js src/tire.adapter.js

extensions:
@./build-scripts/build-extensions.sh

Expand All @@ -35,4 +38,4 @@ website: doc
test: deps
@sed 's/\/\*\*\*_\*\*\*\//$(INJECTORS)/g' src/$(PLUGIN).js > $(TESTED_CODE); \
command -v phantomjs >/dev/null 2>&1 || { echo >&2 "PhantomJS not installed. Run the tests from the browser."; exit 0; }; \
./node_modules/.bin/phantom-jasmine $(RUNNER)
./node_modules/.bin/phantom-jasmine $(RUNNER)
1 change: 1 addition & 0 deletions dist/tire.adapter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

295 changes: 295 additions & 0 deletions src/examples/example.tire.html
@@ -0,0 +1,295 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 boilerplate—all you really need…</title>
<style>
#map {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: white;
}
</style>
</head>

<body>
<div id="map"></div>
<script type="text/javascript" src="http://lab.marcon.me/jhere/tire.js"></script>
<script type="text/javascript" src="../tire.adapter.js"></script>
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> -->
<script type="text/javascript" src="../jhere.js"></script>
<script type="text/javascript">
var heatMapData = [
{
"value": 4899,
"latitude": 52.53026126658807,
"longitude": 13.385298362512387
},
{
"value": 3299,
"latitude": 52.530712612721196,
"longitude": 13.385059833526611
},
{
"value": 36,
"latitude": 52.530215905734003,
"longitude": 13.38543057664563
},
{
"value": 680,
"latitude": 52.530870437622099,
"longitude": 13.3849096298218
},
{
"value": 289,
"latitude": 52.530234520737004,
"longitude": 13.385648693847036
},
{
"value": 27,
"latitude": 52.530488537560281,
"longitude": 13.385252371995787
},
{
"value": 38,
"latitude": 52.530063626141377,
"longitude": 13.385473500409793
},
{
"value": 89,
"latitude": 52.530244890211264,
"longitude": 13.385788119172863
},
{
"value": 6,
"latitude": 52.530253983437007,
"longitude": 13.385760004534591
},
{
"value": 164,
"latitude": 52.529855659002003,
"longitude": 13.384268417202721
},
{
"value": 687,
"latitude": 52.529975,
"longitude": 13.383993
},
{
"value": 1347,
"latitude": 52.529565942430487,
"longitude": 13.384504666194712
},
{
"value": 34,
"latitude": 52.530347321620944,
"longitude": 13.385677040788089
},
{
"value": 184,
"latitude": 52.530878000000001,
"longitude": 13.384904000000001
},
{
"value": 172,
"latitude": 52.529768647948352,
"longitude": 13.384791244138654
},
{
"value": 479,
"latitude": 52.530803986958468,
"longitude": 13.387076854705811
},
{
"value": 128,
"latitude": 52.530900000000003,
"longitude": 13.3847
},
{
"value": 17,
"latitude": 52.529969969813301,
"longitude": 13.385131331173101
},
{
"value": 18,
"latitude": 52.530900000000003,
"longitude": 13.3849
},
{
"value": 3,
"latitude": 52.530006959735175,
"longitude": 13.385183469129728
},
{
"value": 169,
"latitude": 52.529605748442059,
"longitude": 13.384814799655908
},
{
"value": 308,
"latitude": 52.530434197093939,
"longitude": 13.385883058015915
},
{
"value": 71,
"latitude": 52.530757000000001,
"longitude": 13.384383
},
{
"value": 716,
"latitude": 52.530304999999998,
"longitude": 13.383474319999999
},
{
"value": 7,
"latitude": 52.530581520484056,
"longitude": 13.386184774537549
},
{
"value": 3,
"latitude": 52.530765175608799,
"longitude": 13.384771001626588
},
{
"value": 297,
"latitude": 52.530719317584662,
"longitude": 13.383554065723375
},
{
"value": 687,
"latitude": 52.530542917204741,
"longitude": 13.383557796478271
},
{
"value": 13,
"latitude": 52.530131948860614,
"longitude": 13.386342364840072
},
{
"value": 5,
"latitude": 52.530000000000001,
"longitude": 13.3851
},
{
"value": 68,
"latitude": 52.530712612721196,
"longitude": 13.384780883789062
},
{
"value": 21,
"latitude": 52.530496999999997,
"longitude": 13.385122349999998
},
{
"value": 210,
"latitude": 52.529994665670216,
"longitude": 13.38409423828125
},
{
"value": 5,
"latitude": 52.530973479671822,
"longitude": 13.3848509841156
},
{
"value": 220,
"latitude": 52.529781999999997,
"longitude": 13.38395
},
{
"value": 212,
"latitude": 52.530653999999998,
"longitude": 13.383659
},
{
"value": 56,
"latitude": 52.530817064808303,
"longitude": 13.383900201050393
},
{
"value": 88,
"latitude": 52.530654962765965,
"longitude": 13.383485390706522
},
{
"value": 19,
"latitude": 52.530841000000002,
"longitude": 13.384907999999999
},
{
"value": 7,
"latitude": 52.530961968053603,
"longitude": 13.384805275139801
},
{
"value": 376,
"latitude": 52.529297467355825,
"longitude": 13.384428562870935
},
{
"value": 824,
"latitude": 52.529055867792856,
"longitude": 13.385228922324478
},
{
"value": 25,
"latitude": 52.530738935100189,
"longitude": 13.38375270869002
},
{
"value": 157,
"latitude": 52.530112148718082,
"longitude": 13.383579254150391
},
{
"value": 44,
"latitude": 52.530441122208984,
"longitude": 13.386257713051902
},
{
"value": 32,
"latitude": 52.529431550962173,
"longitude": 13.384827986540591
},
{
"value": 235,
"latitude": 52.530798030550265,
"longitude": 13.383918592731648
},
{
"value": 211,
"latitude": 52.529138000000003,
"longitude": 13.384971
},
{
"value": 41,
"latitude": 52.531100735356837,
"longitude": 13.386037485323744
},
{
"value": 28,
"latitude": 52.529808973752715,
"longitude": 13.383999001205726
}
];
</script>
<script type="text/javascript">
$(window).on('load', function(){
//Set default credentials
$.jHERE.defaultCredentials('_peU-uCkp-j8ovkzFGNU', 'gBoUkAMoxoqIWfxWA5DuMQ');

$('#map').jHERE({enable: ['behavior', 'zoombar', 'typeselector', 'positioning', 'contextmenu']});
$('#map').jHERE('type', 'smart').jHERE('marker', [52.49, 13.37], {text: '●', textColor: '#fff', fill: '#004C9A',
click: function(e){
alert(JSON.stringify(e.geo));
}}).jHERE('marker', [52.49, 13.39], {text: '❤', textColor: '#fff', fill: '#004C9A',
click: function(e){
$(this).jHERE('bubble', [52.49, 13.39], {content: JSON.stringify(e.geo), closable: false});
}}).jHERE('heatmap', heatMapData, 'value');
$('#map').jHERE('kml', 'resources/berlin.kml', true);
});
</script>
</body>
</html>

0 comments on commit 7626ce3

Please sign in to comment.