Skip to content

Commit c1d255b

Browse files
committed
fixes #12417 Added new mobile geo charting demo !strict
git-svn-id: http://svn.dojotoolkit.org/src/demos/trunk@24610 560b804f-0ae3-0310-86f3-f6aa0a117693
1 parent 9206573 commit c1d255b

File tree

10 files changed

+1091
-0
lines changed

10 files changed

+1091
-0
lines changed

mobileGeoCharting/README

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-------------------------------------------------------------------------------
2+
Dojo Maps - Dojo Mobile Geo Charting Demo
3+
-------------------------------------------------------------------------------
4+
Authors: Erwan Aullas
5+
-------------------------------------------------------------------------------
6+
Demo description
7+
8+
This is a mobile application showcasing the use of the geo charting dijit component.
9+
It displays a simplified map of the U.S. States colored according to their population
10+
throughout the five last decades.
11+
It is tailored for mobile devices, featuring touch support (multi-touch on enabled devices):
12+
panning (one-fingered), zooming (pinch/spread if available), single tap to select a state and
13+
display population count, and double tap to zoom on a particular state.
14+
15+
16+
-------------------------------------------------------------------------------
17+
Dependencies:
18+
19+
Dojo
20+
Dijit
21+
Dojox
22+
23+
-------------------------------------------------------------------------------
24+
Installation instructions
25+
26+
Simply run the included demo.html
27+
28+
To build, use the supplied demo.profile.js as your profileFile
29+
30+
-------------------------------------------------------------------------------
31+
@rank:99

mobileGeoCharting/demo.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@import "../../dojox/geo/charting/resources/Map.css";
2+
3+
#mapHeader {
4+
height: 30px;
5+
line-height: 30px;
6+
}
7+
8+
#mapLegend {
9+
position:absolute;
10+
margin: 0;
11+
12+
border: 0;
13+
padding: 0;
14+
}
15+
16+
#yearSpinner {
17+
-webkit-transform-origin: 0 0;
18+
-webkit-transform: scale(0.75);
19+
-moz-transform-origin: 0 0;
20+
-moz-transform: scale(0.75);
21+
}
22+
23+
#yearSlot {
24+
border-left: 0;
25+
border-right: 0;
26+
}
27+
28+
.dojoxLegendIcon {
29+
width: 15px;
30+
}
31+
32+
.dojoxLegendText {
33+
vertical-align: middle;
34+
font-size: 10pt;
35+
padding-right: 0px;
36+
}
37+
38+
#mapWidget {
39+
background: -webkit-gradient(linear, left top, left bottom, from(#eaeaea), to(#828282));
40+
background: -moz-linear-gradient(top, #eaeaea, #828282);
41+
}

mobileGeoCharting/demo.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4+
<title>US demographics</title>
5+
<link rel="stylesheet" type="text/css" href="demo.css">
6+
<link rel="stylesheet" type="text/css" href="../../dojox/mobile/themes/iphone/iphone.css">
7+
<link rel="stylesheet" type="text/css" href="../../dojox/mobile/themes/common/SpinWheel.css">
8+
9+
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
10+
<meta name="apple-mobile-web-app-capable" content="yes" />
11+
<script type="text/javascript" djConfig="parseOnLoad:true,gfxRenderer:'svg,canvas,vml,silverlight'"
12+
src="../../dojo/dojo.js"></script>
13+
<script type="text/javascript" src="src.js" charset="utf-8"></script>
14+
</head>
15+
<body>
16+
<!-- csv dataStore -->
17+
<div dojoType="dojox.data.CsvStore" jsId="csvStore" url="resources/data/USPopulation.csv"
18+
identifier="Id" label="State"></div>
19+
20+
<!-- map display page -->
21+
<div id="mapView" dojoType="dojox.mobile.View" selected="true" style="width: 100%; height: 100%; background: rgb(120, 120, 120);">
22+
23+
<h1 dojoType="dojox.mobile.Heading" id="mapHeader" >US population from 1960 to 2009</h1>
24+
25+
<div id="mapWidget" dojoType="dojox.geo.charting.widget.Map" shapeFile="resources/data/US_States_intermediate.json"
26+
dataStore="csvStore" series="resources/data/series.json" markerData="resources/data/markers.json" showTooltips="false"
27+
animateOnResize="false" colorAnimationDuration="300"
28+
adjustMapCenterOnResize="true" adjustMapScaleOnResize="true" dataBindingAttribute="2009"
29+
dataBindingValueFunction="getPopulationForYear" enableMouseSupport="true"
30+
enableMousePan="true" enableMouseZoom="true"
31+
onFeatureClick="onFeatureClick" enableFeatureZoom="false" enableTouchSupport="true"
32+
style="height: 100%; width: 100%;">
33+
</div>
34+
<div id="mapLegend" dojoType="dojox.geo.charting.widget.Legend" map="dijit.byId('mapWidget').getInnerMap()"
35+
swatchSize="10" horizontal="false">
36+
</div>
37+
<div id="yearSpinner" dojoType="dojox.mobile.SpinWheel">
38+
<div id="yearSlot" dojoType="dojox.mobile.SpinWheelSlot"
39+
labels="['1960','1970','1980','1990','2000','2009']"
40+
value = "2009"
41+
style="text-align:center;width:100%;">
42+
</div>
43+
</div>
44+
</div>
45+
</body>
46+
</html>

mobileGeoCharting/demo.profile.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
dependencies = {
2+
layers: [
3+
{
4+
name: "../demos/mobileGeoCharting/src.js",
5+
resourceName: "demos.mobileGeoCharting.src",
6+
dependencies: [
7+
"demos.mobileGeoCharting.src"
8+
]
9+
}
10+
],
11+
12+
prefixes: [
13+
[ "dijit", "../dijit" ],
14+
[ "dojox", "../dojox" ],
15+
[ "demos", "../demos" ]
16+
]
17+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
State,Id,ANSI code,1960,1970,1980,1990,2000,2009
2+
Alabama ,AL,01,"3,267","3,444","3,894","4,050","4,452","4,709"
3+
Alaska ,AK,02,226,303,402,553,627,698
4+
Arizona ,AZ,04,"1,302","1,775","2,718","3,684","5,167","6,596"
5+
Arkansas ,AR,05,"1,786","1,923","2,286","2,357","2,678","2,889"
6+
California ,CA,06,"15,717","19,971","23,668","29,960","33,995","36,962"
7+
Colorado ,CO,08,"1,754","2,210","2,890","3,308","4,328","5,025"
8+
Connecticut ,CT,09,"2,535","3,032","3,108","3,292","3,412","3,518"
9+
Delaware ,DE,10,446,548,594,670,786,885
10+
District of Columbia ,DC,11,764,757,638,605,572,600
11+
Florida ,FL,12,"4,952","6,791","9,746","13,033","16,047","18,538"
12+
Georgia ,GA,13,"3,943","4,588","5,463","6,513","8,230","9,829"
13+
Hawaii ,HI,15,633,770,965,"1,113","1,212","1,295"
14+
Idaho ,ID,16,667,713,944,"1,012","1,300","1,546"
15+
Illinois ,IL,17,"10,081","11,110","11,427","11,453","12,438","12,910"
16+
Indiana ,IN,18,"4,662","5,195","5,490","5,558","6,092","6,423"
17+
Iowa ,IA,19,"2,758","2,825","2,914","2,781","2,928","3,008"
18+
Kansas ,KS,20,"2,179","2,249","2,364","2,481","2,693","2,819"
19+
Kentucky ,KY,21,"3,038","3,221","3,661","3,694","4,049","4,314"
20+
Louisiana ,LA,22,"3,257","3,645","4,206","4,222","4,469","4,492"
21+
Maine ,ME,23,969,994,"1,125","1,232","1,277","1,318"
22+
Maryland ,MD,24,"3,101","3,924","4,217","4,800","5,311","5,699"
23+
Massachusetts ,MA,25,"5,149","5,689","5,737","6,023","6,363","6,594"
24+
Michigan ,MI,26,"7,823","8,882","9,262","9,311","9,955","9,970"
25+
Minnesota ,MN,27,"3,414","3,806","4,076","4,390","4,934","5,266"
26+
Mississippi ,MS,28,"2,178","2,217","2,521","2,579","2,848","2,952"
27+
Missouri ,MO,29,"4,320","4,678","4,917","5,129","5,606","5,988"
28+
Montana ,MT,30,675,694,787,800,903,975
29+
Nebraska ,NE,31,"1,411","1,485","1,570","1,582","1,713","1,797"
30+
Nevada ,NV,32,285,489,800,"1,221","2,018","2,643"
31+
New Hampshire ,NH,33,607,738,921,"1,112","1,240","1,325"
32+
New Jersey ,NJ,34,"6,067","7,171","7,365","7,763","8,431","8,708"
33+
New Mexico ,NM,35,951,"1,017","1,303","1,522","1,821","2,010"
34+
New York ,NY,36,"16,782","18,241","17,558","18,021","18,998","19,541"
35+
North Carolina ,NC,37,"4,556","5,084","5,882","6,664","8,079","9,381"
36+
North Dakota ,ND,38,632,618,653,638,641,647
37+
Ohio ,OH,39,"9,706","10,657","10,798","10,864","11,364","11,543"
38+
Oklahoma ,OK,40,"2,328","2,559","3,025","3,149","3,454","3,687"
39+
Oregon ,OR,41,"1,769","2,092","2,633","2,860","3,431","3,826"
40+
Pennsylvania ,PA,42,"11,319","11,801","11,864","11,903","12,286","12,605"
41+
Rhode Island ,RI,44,859,950,947,"1,006","1,051","1,053"
42+
South Carolina ,SC,45,"2,383","2,591","3,122","3,501","4,024","4,561"
43+
South Dakota ,SD,46,681,666,691,697,756,812
44+
Tennessee ,TN,47,"3,567","3,926","4,591","4,894","5,703","6,296"
45+
Texas ,TX,48,"9,580","11,199","14,229","17,057","20,946","24,782"
46+
Utah ,UT,49,891,"1,059","1,461","1,731","2,244","2,785"
47+
Vermont ,VT,50,390,445,511,565,610,622
48+
Virginia ,VA,51,"3,967","4,651","5,347","6,217","7,105","7,883"
49+
Washington ,WA,53,"2,853","3,413","4,132","4,903","5,911","6,664"
50+
West Virginia ,WV,54,"1,860","1,744","1,950","1,793","1,807","1,820"
51+
Wisconsin ,WI,55,"3,952","4,418","4,706","4,905","5,374","5,655"
52+
Wyoming ,WY,56,330,332,470,454,494,544
53+
54+
Source: U.S. Census Bureau - The 2011 Statistical Abstract � Population � Estimates and Projections--States, Metropolitan Areas, Cities - Resident Population--States
55+

0 commit comments

Comments
 (0)