Subversion Repositories php-qbpwcf

Rev

Rev 23 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 liveuser 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
 
4
    <head>
5
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
        <title>amMap examples</title>
7
 
8
        <link rel="stylesheet" href="../ammap/ammap.css" type="text/css">
9
        <script src="../ammap/ammap.js" type="text/javascript"></script>
10
        <!-- map file should be included after ammap.js -->
11
		<script src="../ammap/maps/js/worldLow.js" type="text/javascript"></script>
12
 
13
		<script>
14
			var map;
15
 
16
			// svg path for target icon
17
			var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z";
18
			// svg path for plane icon
19
			var planeSVG = "M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z";
20
 
21
			AmCharts.ready(function() {
22
			    map = new AmCharts.AmMap();
23
 
24
 
25
			    var dataProvider = {
26
			        mapVar: AmCharts.maps.worldLow
27
			    };
28
 
29
			    map.areasSettings = {
30
			        unlistedAreasColor: "#FFCC00"
31
			    };
32
 
33
			    map.imagesSettings = {
34
			        color: "#CC0000",
35
			        rollOverColor: "#CC0000",
36
			        selectedColor: "#000000"
37
			    };
38
 
39
			    map.linesSettings = {
40
			        color: "#CC0000",
41
			        alpha: 0.4
42
			    };
43
 
44
			    // LONDON
45
			    var london = {
46
			        id: "london",
47
			        color: "#000000",
48
			        svgPath: targetSVG,
49
			        title: "London",
50
			        latitude: 51.5002,
51
			        longitude: -0.1262,
52
			        scale: 1.5,
53
			        zoomLevel: 2.74,
54
			        zoomLongitude: -20.1341,
55
			        zoomLatitude: 49.1712,
56
 
57
			        lines: [
58
			            {
59
			            latitudes: [51.5002, 50.4422],
60
			            longitudes: [-0.1262, 30.5367]},
61
			        {
62
			            latitudes: [51.5002, 46.9480],
63
			            longitudes: [-0.1262, 7.4481]},
64
			        {
65
			            latitudes: [51.5002, 59.3328],
66
			            longitudes: [-0.1262, 18.0645]},
67
			        {
68
			            latitudes: [51.5002, 40.4167],
69
			            longitudes: [-0.1262, -3.7033]},
70
			        {
71
			            latitudes: [51.5002, 46.0514],
72
			            longitudes: [-0.1262, 14.5060]},
73
			        {
74
			            latitudes: [51.5002, 48.2116],
75
			            longitudes: [-0.1262, 17.1547]},
76
			        {
77
			            latitudes: [51.5002, 44.8048],
78
			            longitudes: [-0.1262, 20.4781]},
79
			        {
80
			            latitudes: [51.5002, 55.7558],
81
			            longitudes: [-0.1262, 37.6176]},
82
			        {
83
			            latitudes: [51.5002, 38.7072],
84
			            longitudes: [-0.1262, -9.1355]},
85
			        {
86
			            latitudes: [51.5002, 54.6896],
87
			            longitudes: [-0.1262, 25.2799]},
88
			        {
89
			            latitudes: [51.5002, 64.1353],
90
			            longitudes: [-0.1262, -21.8952]},
91
			        {
92
			            latitudes: [51.5002, 40.4300],
93
			            longitudes: [-0.1262, -74.0000]}
94
			        ],
95
 
96
			        images: [{
97
			            label: "Flights from London",
98
			            svgPath: planeSVG,
99
			            left: 100,
100
			            top: 45,
101
			            labelShiftY:5,
102
			            color: "#CC0000",
103
			            labelColor: "#CC0000",
104
			            labelRollOverColor: "#CC0000",
105
			            labelFontSize: 20},
106
			        {
107
			            label: "show flights from Vilnius",
108
			            left: 106,
109
			            top: 70,
110
			            labelColor: "#000000",
111
			            labelRollOverColor: "#CC0000",
112
			            labelFontSize: 11,
113
			            linkToObject: "vilnius"}]
114
			    };
115
 
116
 
117
			    // VILNIUS
118
			    var vilnius = {
119
			        id: "vilnius",
120
			        color: "#000000",
121
			        svgPath: targetSVG,
122
			        title: "Vilnius",
123
			        latitude: 54.6896,
124
			        longitude: 25.2799,
125
			        scale: 1.5,
126
			        zoomLevel: 4.92,
127
			        zoomLongitude: 15.4492,
128
			        zoomLatitude: 50.2631,
129
 
130
			        lines: [{
131
			            latitudes: [54.6896, 50.8371],
132
			            longitudes: [25.2799, 4.3676]},
133
			        {
134
			            latitudes: [54.6896, 59.9138],
135
			            longitudes: [25.2799, 10.7387]},
136
			        {
137
			            latitudes: [54.6896, 40.4167],
138
			            longitudes: [25.2799, -3.7033]},
139
			        {
140
			            latitudes: [54.6896, 50.0878],
141
			            longitudes: [25.2799, 14.4205]},
142
			        {
143
			            latitudes: [54.6896, 48.2116],
144
			            longitudes: [25.2799, 17.1547]},
145
			        {
146
			            latitudes: [54.6896, 44.8048],
147
			            longitudes: [25.2799, 20.4781]},
148
			        {
149
			            latitudes: [54.6896, 55.7558],
150
			            longitudes: [25.2799, 37.6176]},
151
			        {
152
			            latitudes: [54.6896, 37.9792],
153
			            longitudes: [25.2799, 23.7166]},
154
			        {
155
			            latitudes: [54.6896, 54.6896],
156
			            longitudes: [25.2799, 25.2799]},
157
			        {
158
			            latitudes: [54.6896, 51.5002],
159
			            longitudes: [25.2799, -0.1262]},
160
			        {
161
			            latitudes: [54.6896, 53.3441],
162
			            longitudes: [25.2799, -6.2675]}],
163
 
164
			        images: [{
165
			            label: "Flights from Vilnius",
166
			            svgPath: planeSVG,
167
			            left: 100,
168
			            top: 45,
169
			            labelShiftY:5,
170
			            color: "#CC0000",
171
			            labelColor: "#CC0000",
172
			            labelRollOverColor: "#CC0000",
173
			            labelFontSize: 20},
174
			        {
175
			            label: "show flights from London",
176
			            left: 106,
177
			            top: 70,
178
			            labelColor: "#000000",
179
			            labelRollOverColor: "#CC0000",
180
			            labelFontSize: 11,
181
			            linkToObject: "london"}]
182
			    };
183
 
184
			    // cities
185
			    var cities = [
186
			        london,
187
			        vilnius,
188
			    {
189
			        svgPath: targetSVG,
190
			        title: "Brussels",
191
			        latitude: 50.8371,
192
			        longitude: 4.3676},
193
			    {
194
			        svgPath: targetSVG,
195
			        title: "Prague",
196
			        latitude: 50.0878,
197
			        longitude: 14.4205},
198
			    {
199
			        svgPath: targetSVG,
200
			        title: "Athens",
201
			        latitude: 37.9792,
202
			        longitude: 23.7166},
203
			    {
204
			        svgPath: targetSVG,
205
			        title: "Reykjavik",
206
			        latitude: 64.1353,
207
			        longitude: -21.8952},
208
			    {
209
			        svgPath: targetSVG,
210
			        title: "Dublin",
211
			        latitude: 53.3441,
212
			        longitude: -6.2675},
213
			    {
214
			        svgPath: targetSVG,
215
			        title: "Oslo",
216
			        latitude: 59.9138,
217
			        longitude: 10.7387},
218
			    {
219
			        svgPath: targetSVG,
220
			        title: "Lisbon",
221
			        latitude: 38.7072,
222
			        longitude: -9.1355},
223
			    {
224
			        svgPath: targetSVG,
225
			        title: "Moscow",
226
			        latitude: 55.7558,
227
			        longitude: 37.6176},
228
			    {
229
			        svgPath: targetSVG,
230
			        title: "Belgrade",
231
			        latitude: 44.8048,
232
			        longitude: 20.4781},
233
			    {
234
			        svgPath: targetSVG,
235
			        title: "Bratislava",
236
			        latitude: 48.2116,
237
			        longitude: 17.1547},
238
			    {
239
			        svgPath: targetSVG,
240
			        title: "Ljubljana",
241
			        latitude: 46.0514,
242
			        longitude: 14.5060},
243
			    {
244
			        svgPath: targetSVG,
245
			        title: "Madrid",
246
			        latitude: 40.4167,
247
			        longitude: -3.7033},
248
			    {
249
			        svgPath: targetSVG,
250
			        title: "Stockholm",
251
			        latitude: 59.3328,
252
			        longitude: 18.0645},
253
			    {
254
			        svgPath: targetSVG,
255
			        title: "Bern",
256
			        latitude: 46.9480,
257
			        longitude: 7.4481},
258
			    {
259
			        svgPath: targetSVG,
260
			        title: "Kiev",
261
			        latitude: 50.4422,
262
			        longitude: 30.5367},
263
			    {
264
			        svgPath: targetSVG,
265
			        title: "Paris",
266
			        latitude: 48.8567,
267
			        longitude: 2.3510},
268
			    {
269
			        svgPath: targetSVG,
270
			        title: "New York",
271
			        latitude: 40.43,
272
			        longitude: -74}];
273
 
274
 
275
			    dataProvider.linkToObject = london;
276
			    dataProvider.images = cities;
277
			    map.dataProvider = dataProvider;
278
				map.backgroundZoomsToTop = true;
279
				map.linesAboveImages = true;
280
			    map.write("mapdiv");
281
 
282
			});
283
 
284
        </script>
285
    </head>
286
 
287
    <body>
288
        <div id="mapdiv" style="width: 100%; background-color:#eeeeee; height: 500px;"></div>
289
    </body>
290
 
291
</html>