-
Notifications
You must be signed in to change notification settings - Fork 29
/
jquery.japan-map.js
1332 lines (1171 loc) · 87.4 KB
/
jquery.japan-map.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*!
* Japan Map Selector (jQuery Plugin) v0.0.1
*
* Copyright (c) 2014 Takemaru Hirai
* http://takemaru-hirai.github.io/japan-map-selector/
*
* Released under the MIT license
*
* Includes code of tikamoton
* http://jsdo.it/tikamoton/vz68
*
* Date: 2014-05-15
*/
;(function($){
"use strict";
$.fn.japanMap = function(options){
var target = $(this);
for (var option in options)
if (options.hasOwnProperty(option) && options[option] == null) options[option] = undefined;
options = $.extend({
type : "canvas", // Only type of "canvas" exist now. Perhaps "svg" in future.
selection : "prefecture", // "prefecture" or "area"
width : null, // Canvas will be scaled to larger one of "width" and "height".
height : null,
color : "#a0a0a0", // Default color, which used if no color is set in "areas" object.
hoverColor : null, // If null, "color" will be 20% brightened when hovered.
backgroundColor : "transparent", // Background color of the element, like "canvas".
borderLineColor : "#ffffff", // Border Line of Prefectures.
borderLineWidth : 0.25,
lineColor : "#a0a0a0", // Border Line of the element and the partition line when "movesIsland" is true.
lineWidth : 1,
drawsBoxLine : true,
showsPrefectureName : false,
prefectureNameType : "full",
showsAreaName : false,
areaNameType : "full",
areas : definition_of_allJapan,
prefectures : definition_of_prefectures,
movesIslands : false, // Moves Nansei Islands (Okinawa and part of Kagishima) to the left-top space.
font : "Arial",
fontSize : null,
fontColor : null,
fontShadowColor : null,
onSelect : function(){},
onHover : function(){}
}, options);
var map;
map = new MapCanvas(options);
target.append(map.element);
map.render(); // IE and Safari doesn't render properly when rendered before appending to the parent.
map.addEvent(); // iPad 1st + iOS5 doesn't work if this sentence is put before "target.append".
return target;
};
// ---------------------------------------------------------------------------------------------------------------
// Just for polyfill.
// ---------------------------------------------------------------------------------------------------------------
if (!('indexOf' in Array.prototype)) {
Array.prototype.indexOf= function(find, i) {
if (i===undefined) i= 0;
if (i<0) i+= this.length;
if (i<0) i= 0;
for (var n= this.length; i<n; i++)
if (i in this && this[i]===find)
return i;
return -1;
};
}
if (!('forEach' in Array.prototype)) {
Array.prototype.forEach= function(action, that) {
for (var i= 0, n= this.length; i<n; i++)
if (i in this)
action.call(that, this[i], i, this);
};
}
if (!('map' in Array.prototype)) {
Array.prototype.map= function(mapper, that) {
var other= new Array(this.length);
for (var i= 0, n= this.length; i<n; i++)
if (i in this)
other[i]= mapper.call(that, this[i], i, this);
return other;
};
}
if (!('filter' in Array.prototype)) {
Array.prototype.filter= function(filter, that) {
var other= [], v;
for (var i=0, n= this.length; i<n; i++)
if (i in this && filter.call(that, v= this[i], i, this))
other.push(v);
return other;
};
}
// ---------------------------------------------------------------------------------------------------------------
// I guess "Cross-browser" may be a word of fantasy...
// https://w3g.jp/blog/studies/touches_events
// http://stackoverflow.com/questions/8751479/javascript-detect-metro-ui-version-of-ie
// ---------------------------------------------------------------------------------------------------------------
var _ua = (function(){
return {
Touch : typeof document.ontouchstart !== "undefined",
Pointer : window.navigator.pointerEnabled,
MSPointer : window.navigator.msPointerEnabled
}
})();
var isWinDesktop = (function(){
var supported = null;
try {
supported = !!new ActiveXObject("htmlfile");
} catch (e) {
supported = false;
}
return supported;
})();
var _start = _ua.Pointer ? 'pointerdown' : _ua.MSPointer ? 'MSPointerDown' : _ua.Touch ? 'touchstart' : 'mousedown' ;
var _move = _ua.Pointer ? 'pointermove' : _ua.MSPointer ? 'MSPointerMove' : _ua.Touch ? 'touchmove' : 'mousemove' ;
var _end = _ua.Pointer ? 'pointerup' : _ua.MSPointer ? 'MSPointerUp' : _ua.Touch ? 'touchend' : 'mouseup' ;
var _enter = _ua.Pointer ? 'pointerenter' : _ua.MSPointer ? 'MSPointerEnter' : _ua.Touch ? 'touchenter' : 'mouseenter';
var _leave = _ua.Pointer ? 'pointerleave' : _ua.MSPointer ? 'MSPointerLeave' : _ua.Touch ? 'touchleave' : 'mouseleave';
// ---------------------------------------------------------------------------------------------------------------
/* Base Class */
// ---------------------------------------------------------------------------------------------------------------
var Map = function(options){
this.options = options;
this.base = {width:651, height:571};
this.NanseiIslands = {left:0, top:-400, width:100, height:160};
this.okinawaCliclableZone = {x:0, y:515, w:180, h:56};
this.fitSize();
this.initializeData();
};
Map.prototype.initializeData = function(){
this.setData(null,null);
};
Map.prototype.setData = function(prefecture,area){
this.data = {
code : prefecture? prefecture.code : null,
name : prefecture? this.getName(prefecture) : null,
fullName : prefecture? prefecture.name: null,
ShortName : prefecture? this.getShortName(prefecture) : null,
englishName : prefecture? this.getEnglishName(prefecture) : null,
area : area? area : null
};
};
Map.prototype.hasData = function(){
return this.data && this.data.code && this.data.code !== null;
};
Map.prototype.fitSize = function(){
this.size = {};
if (this.options.movesIslands){
this.base.width = this.base.width - this.NanseiIslands.width;
this.base.height = this.base.height - this.NanseiIslands.height;
}
if (! this.options.width && ! this.options.height){
this.options.width = this.base.width;
this.options.height = this.base.height;
} else if (this.options.width && ! this.options.height) {
this.options.height = this.base.height * this.options.width / this.base.width;
} else if (! this.options.width && this.options.height) {
this.options.width = this.base.width * this.options.height / this.base.height;
}
if (this.options.height / this.options.width > this.base.height / this.base.width){
this.size.width = this.options.width;
this.size.height = this.options.width * this.base.height / this.base.width;
} else {
this.size.width = this.options.height * this.base.width / this.base.height;
this.size.height = this.options.height;
}
};
Map.prototype.addEvent = function(){
var self = this;
var _target = $(this.element);
if (_ua.Pointer && ! isWinDesktop || _ua.MSPointer && ! isWinDesktop || _ua.Touch){
if (_ua.Pointer || _ua.MSPointer){
_target.css("-ms-touch-action", "none").css("touch-action", "none");
}
_target.on(_start, function(e){
var point = e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0] : e;
self.pointer = {
x: point.pageX - _target[0].offsetLeft,
y: point.pageY - _target[0].offsetTop
};
self.render();
if (self.isHovering()) {
e.preventDefault();
e.stopPropagation();
}
_target.on(_move, function(e){
point = e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0] : e;
if (self.isHovering()) {
self.pointer = {
x: point.pageX - _target[0].offsetLeft,
y: point.pageY - _target[0].offsetTop
};
self.render();
e.preventDefault();
e.stopPropagation();
}
});
$(document).on(_end, function(e){
point = e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0] : e;
if (self.data.code !== null && self.data.name != null && "onSelect" in self.options){
setTimeout(function(){
self.options.onSelect(self.data);
} ,0);
}
self.pointer = null;
_target.off(_move);
$(document).off(_end);
});
});
} else {
_target.on("mousemove", function(e){
var point = e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0] : e;
self.pointer = {
x: point.pageX - _target[0].offsetLeft,
y: point.pageY - _target[0].offsetTop
};
self.render();
});
_target.on("mousedown", function(e){
var point = e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0] : e;
if (self.data.code !== null && self.data.name != null && "onSelect" in self.options){
setTimeout(function(){
self.options.onSelect(self.data);
} ,0);
}
self.pointer = null;
});
_target.on("mouseout", function(e){
self.pointer = null;
self.render();
});
}
};
Map.prototype.findPrefectureByCode = function(code){
var results = this.options.prefectures.filter(function(p){return p.code == code});
return (results.length>0)? results[0] : null;
};
Map.prototype.findAreaBelongingToByCode = function(code){
var results = this.options.areas.filter(function(a){return a.prefectures.indexOf(code) > -1 });
return (results.length>0)? results[0] : null;
};
Map.prototype.isNanseiIslands = function(path){
var islands = ["屋久島","種子島","奄美諸島","沖縄本島","多良間島","宮古島","伊是名島","伊平屋島","八重山諸島"];
return "name" in path && islands.indexOf(path.name) > -1;
};
Map.prototype.brighten = function(hex, lum) {
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];
}
lum = lum || 0;
var rgb = "#", c, i;
for (i = 0; i < 3; i++) {
c = parseInt(hex.substr(i*2,2), 16);
c = Math.round(Math.min(Math.max(0, parseInt(c + (c * lum))), 255)).toString(16);
rgb += ("00"+c).substr(c.length);
}
return rgb;
};
Map.prototype.getName = function(prefecture_or_area){
switch (this.isArea(prefecture_or_area)? this.options.areaNameType : this.options.prefectureNameType){
case "short" : return this.getShortName(prefecture_or_area);
case "english" : return this.getEnglishName(prefecture_or_area);
case "romaji" : return this.getEnglishName(prefecture_or_area);
case "full" : return prefecture_or_area.name;
case "kanji" : return prefecture_or_area.name;
default : return prefecture_or_area.name;
}
};
Map.prototype.getShortName = function(prefecture_or_area){
if (this.isArea(prefecture_or_area)){
return prefecture_or_area.name.replace(/地方$/, "");
}
return prefecture_or_area.name.replace(/[都|府|県]$/, "");
};
Map.prototype.getEnglishName = function(prefecture_or_area){
if (this.isArea(prefecture_or_area)){
return prefecture_or_area.english? prefecture_or_area.english : null;
}
return definition_of_english_name[prefecture_or_area.code];
};
Map.prototype.isArea = function(prefecture_or_area){
return this.options.areas.indexOf(prefecture_or_area) > -1;
};
// ---------------------------------------------------------------------------------------------------------------
/* Canvas */
// ---------------------------------------------------------------------------------------------------------------
var MapCanvas = function(){
var available = !!document.createElement('canvas').getContext;
if (! available){
throw "Your browser may not support CANVAS.";
}
this.element = document.createElement("canvas");
Map.apply(this, arguments);
this.element.width = this.size.width;
this.element.height = this.size.height;
};
MapCanvas.prototype = Object.create(Map.prototype);
MapCanvas.prototype.constructor = Map;
MapCanvas.prototype.render = function(){
var context = this.element.getContext("2d");
context.clearRect( 0, 0, this.element.width, this.element.height );
this.hovering = false;
this.hovered = null;
var render = this.options.selection == "area" ? this.renderAreaMap : this.renderPrefectureMap;
render.apply(this);
if (! this.hovering)
this.initializeData();
this.element.style.background = this.options.backgroundColor;
if (this.options.drawsBoxLine){
this.element.style.borderWidth = this.options.lineWidth + "px";
this.element.style.borderColor = this.options.lineColor;
this.element.style.borderStyle = "solid";
}
this.drawIslandsLine();
this.drawName();
};
MapCanvas.prototype.renderPrefectureMap = function(){
var context = this.element.getContext("2d");
this.options.prefectures.forEach(function(prefecture){
context.beginPath();
this.drawPrefecture(prefecture);
context.closePath();
var area = this.findAreaBelongingToByCode(prefecture.code);
if (area){
this.setProperties(prefecture,area);
} else {
throw "No area has such prefecture code '" + code + "'.";
}
context.fill();
if (this.options.borderLineColor && this.options.borderLineWidth > 0)
context.stroke();
}, this);
};
MapCanvas.prototype.renderAreaMap = function(){
var context = this.element.getContext("2d");
this.options.areas.forEach(function(area){
context.beginPath();
area.prefectures.forEach(function(code){
var prefecture = this.findPrefectureByCode(code);
if (prefecture) {
this.drawPrefecture(prefecture);
} else {
throw "No prefecture code '" + code + "' is defined.";
}
}, this);
context.closePath();
this.setProperties(area,area);
context.fill();
if (this.options.borderLineColor && this.options.borderLineWidth > 0)
context.stroke();
}, this);
};
MapCanvas.prototype.drawPrefecture = function(prefecture){
prefecture.path.forEach(function(p){
var OFFSET = {X:0, Y:0};
if (this.options.movesIslands){
OFFSET = {
X:OFFSET.X + (this.isNanseiIslands(p)? this.NanseiIslands.left : - this.NanseiIslands.width) ,
Y:OFFSET.Y + (this.isNanseiIslands(p)? this.NanseiIslands.top : 0)
};
}
if ("coords" in p) this.drawCoords(p.coords, OFFSET);
if ("subpath" in p){
p.subpath.forEach(function(s){
if ("coords" in s) this.drawCoords(s.coords, OFFSET);
}, this);
}
}, this);
};
MapCanvas.prototype.drawName = function(){
if (! this.options.showsPrefectureName && ! this.options.showsAreaName)
return;
var drawsArea = this.options.showsAreaName && (! this.options.showsPrefectureName || this.options.selection == "area");
if (drawsArea) {
this.options.areas.forEach(function(area){
var center = {x:0, y:0, n:0};
area.prefectures.forEach(function(code){
var prefecture = this.findPrefectureByCode(code);
var _center = this.getCenterOfPrefecture(prefecture);
center.n ++;
center.x = (center.x * (center.n - 1) + _center.x) / center.n;
center.y = (center.y * (center.n - 1) + _center.y) / center.n;
}, this);
this.drawText(area, center);
}, this);
} else {
this.options.prefectures.forEach(function(prefecture){
var center = this.getCenterOfPrefecture(prefecture);
this.drawText(prefecture, center);
}, this);
}
};
MapCanvas.prototype.drawText = function(prefecture_or_area, point){
var context = this.element.getContext("2d");
var area = this.isArea(prefecture_or_area)? prefecture_or_area : this.findAreaBelongingToByCode(prefecture_or_area.code);
var drawsArea = this.options.showsAreaName && (! this.options.showsPrefectureName || this.options.selection == "area");
context.save();
if (this.options.fontColor && this.options.fontColor == "areaColor"){
var hovered;
if (drawsArea == (this.options.selection == "area")){
hovered = this.hovered == prefecture_or_area.code;
} else if (drawsArea) {
hovered = area.prefectures.indexOf(this.hovered) > -1;
} else {
hovered = this.hovered == area.code;
}
var color = area.color? area.color : this.options.color;
var hvColor = area.color && area.hoverColor ?
area.hoverColor :
area.color?
this.brighten(area.color, 0.2) :
this.options.hoverColor? this.options.hoverColor : this.brighten(this.options.color, 0.2);
context.fillStyle = hovered ? hvColor : color;
} else if (this.options.fontColor) {
context.fillStyle = this.options.fontColor;
} else {
context.fillStyle = this.options.color;
}
context.font = (this.options.fontSize? this.options.fontSize : this.element.width / 100) + "px '" + (this.options.font? this.options.font : "Arial") + "'";
context.textAlign = 'center';
context.textBaseline = 'middle';
if (this.options.fontShadowColor){
context.shadowColor = this.options.fontShadowColor;
context.shadowBlur = 5;
}
for (var i = 0; i < 5; i++)
context.fillText(this.getName(prefecture_or_area), point.x * this.element.width / this.base.width, point.y * this.element.height / this.base.height);
context.restore();
};
MapCanvas.prototype.getCenterOfPrefecture = function(prefecture){
var center = {x:0, y:0, n:0};
var OFFSET = {X:0, Y:0};
switch (prefecture.name){
case "北海道" : OFFSET.X = 10; OFFSET.Y = -5; break;
case "宮城県" : OFFSET.Y = 5; break;
case "山形県" : OFFSET.Y = -5; break;
case "埼玉県" : OFFSET.Y = -3; break;
case "神奈川県": OFFSET.Y = 2; break;
case "千葉県" : OFFSET.X = 7; break;
case "石川県" : OFFSET.Y = -5; break;
case "滋賀県" : OFFSET.Y = 5; break;
case "京都府" : OFFSET.Y = -2; break;
case "兵庫県" : OFFSET.Y = 4; break;
case "三重県" : OFFSET.Y = -5; break;
case "広島県" : OFFSET.Y = -3; break;
case "島根県" : OFFSET.X = -5; break;
case "高知県" : OFFSET.X = 5; break;
case "福岡県" : OFFSET.Y = -5; break;
case "長崎県" : OFFSET.Y = 5; break;
}
var path = prefecture.path[0];
if (this.options.movesIslands){
OFFSET = {
X:OFFSET.X + (this.isNanseiIslands(path)? this.NanseiIslands.left : - this.NanseiIslands.width) ,
Y:OFFSET.Y + (this.isNanseiIslands(path)? this.NanseiIslands.top : 0)
};
}
if ("coords" in path) {
var i = 0;
while(true){
var x = path.coords[i * 2 + 0];
var y = path.coords[i * 2 + 1];
if (typeof x === "undefined" || typeof y === "undefined") break;
x = x + OFFSET.X;
y = y + OFFSET.Y;
center.n ++;
center.x = (center.x * (center.n - 1) + x) / center.n;
center.y = (center.y * (center.n - 1) + y) / center.n;
i++;
}
}
return center;
};
MapCanvas.prototype.drawCoords = function(coords, OFFSET){
var context = this.element.getContext("2d");
var i = 0;
while(true){
var x = coords[i * 2 + 0];
var y = coords[i * 2 + 1];
if (typeof x === "undefined" || typeof y === "undefined") break;
x = x + OFFSET.X;
y = y + OFFSET.Y;
if(i==0) {
context.moveTo( x * this.element.width / this.base.width, y * this.element.height / this.base.height );
} else {
context.lineTo( x * this.element.width / this.base.width, y * this.element.height / this.base.height );
}
i++;
}
};
MapCanvas.prototype.drawIslandsLine = function(){
var context = this.element.getContext("2d");
if (this.options.movesIslands){
context.beginPath();
context.moveTo( 0 , 200 * this.element.height / this.base.height );
context.lineTo( 150 * this.element.width / this.base.width, 200 * this.element.height / this.base.height );
context.lineTo( 350 * this.element.width / this.base.width, 0 );
context.strokeStyle = this.options.lineColor;
context.lineWidth = this.options.lineWidth;
context.stroke();
}
};
MapCanvas.prototype.setProperties = function(prefecture, area){
var context = this.element.getContext("2d");
context.fillStyle = ("color" in area)? area.color : this.options.color;
if (this.options.borderLineColor)
context.strokeStyle = this.options.borderLineColor;
if (this.options.borderLineWidth)
context.lineWidth = this.options.borderLineWidth;
var pointerIsOn = this.pointer && context.isPointInPath( this.pointer.x, this.pointer.y );
if (pointerIsOn){
this.hovering = true;
this.hovered = prefecture.code;
if (this.data.code != prefecture.code && this.options.onHover){
this.setData(prefecture,area);
this.options.onHover(this.data);
} else {
this.setData(prefecture,area);
}
if (area.hoverColor)
context.fillStyle = area.hoverColor;
else if (this.options.hoverColor)
context.fillStyle = this.options.hoverColor;
else
context.fillStyle = this.brighten(context.fillStyle, 0.2);
}
this.element.style.cursor = (this.data.code == null)? "default" : "pointer";
};
MapCanvas.prototype.isHovering = function(){
return this.hovering;
};
// ---------------------------------------------------------------------------------------------------------------
/* data */
var definition_of_allJapan = [
{
"code" :0,
"name" :"日本",
"english" :"Japan",
"color" :"#a0a0a0",
"prefectures":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]
}
];
var definition_of_prefectures = [
{
"code" : 1,
"name" : "北海道",
"path" : [
{
"coords" : [483,92,483,93,483,95,483,97,482,99,481,100,482,101,483,103,484,103,484,104,485,105,487,106,488,107,489,109,489,110,489,111,488,114,488,114,487,114,486,116,486,119,486,121,486,122,487,124,488,124,490,124,491,124,493,122,494,122,495,119,495,117,496,117,497,116,498,116,499,114,499,113,501,114,500,114,500,115,500,115,501,115,502,115,504,115,505,116,506,116,507,116,508,114,509,114,510,114,510,113,509,113,509,112,507,111,505,110,504,109,504,108,502,107,502,106,501,106,501,105,499,105,498,105,495,103,493,102,492,101,492,100,493,96,494,95,497,93,499,93,500,93,501,94,502,95,502,95,503,96,504,97,505,99,505,99,505,99,505,99,505,100,505,100,506,100,506,100,507,99,508,97,509,96,511,96,511,95,516,92,522,92,525,93,527,95,531,97,534,99,535,100,536,100,539,102,540,102,542,103,544,104,546,104,547,105,549,107,551,108,551,108,552,106,553,105,553,102,553,101,552,98,554,95,556,91,557,89,565,81,566,80,567,80,570,78,571,78,572,79,573,79,575,79,578,79,579,79,580,79,579,79,579,78,581,76,581,76,582,76,582,76,581,76,581,76,581,77,581,77,581,78,583,78,583,78,584,78,584,77,585,77,585,76,586,76,586,75,587,75,586,75,586,74,587,73,587,73,588,73,589,72,590,72,593,71,593,72,593,72,594,71,594,70,594,70,595,69,595,68,596,68,597,67,597,67,598,66,599,66,598,65,589,67,588,65,587,61,586,60,585,59,585,59,584,58,584,57,584,55,584,54,584,53,584,52,586,50,586,48,587,46,588,44,588,43,588,42,587,41,587,41,586,42,586,43,585,43,585,44,584,46,581,48,581,49,580,50,579,51,578,52,576,53,570,53,568,52,568,51,567,50,567,49,566,49,566,50,565,51,565,51,565,50,564,49,561,48,561,48,561,48,561,49,561,50,560,49,558,49,557,49,557,49,556,47,557,47,557,47,550,43,549,43,548,42,546,41,544,39,543,39,541,37,540,35,539,35,537,32,536,31,535,30,535,30,534,29,534,28,533,27,532,25,529,22,526,18,524,16,523,16,522,15,521,14,520,15,520,16,518,17,518,17,517,16,516,16,516,17,516,19,516,20,515,21,516,25,519,34,519,39,519,41,519,43,518,44,518,44,518,45,517,46,517,46,517,50,518,52,518,54,517,55,517,55,517,56,516,58,515,58,514,59,512,60,512,61,511,62,512,63,512,64,512,64,512,65,512,66,512,67,513,69,514,71,512,75,510,77,508,77,507,77,507,76,506,75,506,75,504,75,503,76,502,76,501,76,499,74,499,74,498,73,497,73,495,71,495,72,495,72,494,72,493,73,493,74,492,75,493,77,494,77,495,79,495,79,496,81,495,82,493,84,492,85,492,87,491,87,490,86,489,87,489,88,488,89,487,89,486,90,484,90,483,91,483,91,483,92,483,92]
},{
"name" : "礼文島",
"coords" : [506,19,505,20,505,20,505,20,505,19,504,18,504,16,505,15,506,19,506,19]
},{
"name" : "利尻島",
"coords" : [508,21,509,21,510,22,511,23,510,25,508,24,507,23,508,21,508,21]
},{
"name" : "奥尻島",
"coords" : [477,102,477,103,476,104,476,106,475,107,474,105,474,103,475,103,475,103,476,102,477,102,477,102]
},
{
"name" : "北方領土",
"subpath" : [
{
"name" : "択捉島",
"coords" : [645,2,647,1,649,1,650,2,649,3,649,3,649,4,649,6,647,7,644,8,643,9,643,9,643,9,641,11,639,12,638,13,638,13,636,16,635,18,632,19,631,19,631,19,630,19,629,18,628,19,629,20,628,22,627,23,625,25,623,28,622,30,621,31,620,31,619,33,618,34,617,35,616,34,616,33,617,32,617,31,616,30,617,29,617,30,618,31,618,30,618,29,619,29,620,29,620,28,621,27,621,26,620,26,619,26,619,25,620,24,621,25,622,24,622,23,622,23,623,22,624,20,625,19,626,18,626,16,628,16,629,15,630,13,631,12,632,10,631,9,632,7,633,7,634,9,635,10,639,9,641,8,642,6,642,6,642,6,644,3,645,2,645,2]
},{
"name" : "歯舞島",
"coords" : [606,61,605,63,604,62,604,61,605,60,606,61,606,61]
},{
"name" : "色丹島",
"coords" : [617,50,618,50,619,51,617,52,616,52,618,53,616,53,615,55,614,55,613,54,613,53,614,52,615,51,616,50,617,50,617,50]
},{
"name" : "国後島",
"coords" : [605,36,608,37,610,35,610,38,609,38,608,38,607,38,607,39,606,40,605,41,603,41,602,42,601,43,601,44,600,45,599,45,599,45,599,46,598,47,599,48,598,48,598,48,597,50,596,51,594,52,594,53,593,55,593,59,593,58,593,57,592,57,591,57,590,56,590,54,591,52,593,50,595,48,596,48,596,46,596,45,597,44,597,43,597,43,599,41,601,37,601,36,602,35,602,35,604,35,605,36,605,36]
}
]
}
]
},
{
"code" : 2,
"name" : "青森県",
"path" : [
{
"coords" : [514,125,515,124,516,124,516,125,515,128,515,142,517,147,518,148,519,148,520,149,521,150,521,151,521,151,521,151,519,152,518,153,517,153,516,153,514,154,514,154,513,154,511,155,509,156,507,157,506,157,506,155,506,154,506,152,506,152,505,152,504,150,503,150,503,151,502,151,501,152,500,152,499,152,498,152,495,151,495,150,493,150,493,151,493,151,489,152,488,151,487,151,486,151,486,152,486,152,485,150,485,148,484,147,484,148,483,147,484,146,485,145,485,144,487,142,488,142,489,143,490,142,491,142,492,138,492,136,493,135,493,135,493,136,494,135,494,135,495,135,493,135,493,134,493,134,493,133,491,133,490,132,491,132,492,132,493,130,493,130,493,129,494,129,495,130,496,130,497,130,499,131,499,134,500,139,501,141,503,140,504,138,504,138,503,137,504,135,506,136,506,137,507,138,507,138,509,139,511,138,511,135,512,132,511,129,510,128,510,128,510,128,509,130,506,131,504,131,502,132,502,131,502,129,503,124,504,123,504,122,504,121,505,121,506,122,509,123,510,124,512,126,514,125,514,125]
}
]
},
{
"code" : 3,
"name" : "岩手県",
"path" : [
{
"coords" : [521,151,521,151,519,152,518,153,517,153,516,153,514,154,514,154,513,154,511,155,509,156,507,157,506,157,504,160,504,164,504,166,505,167,503,167,503,167,503,168,504,169,504,169,503,170,503,171,503,171,504,172,503,174,502,175,502,175,502,176,501,177,501,179,500,180,501,181,501,182,501,183,503,185,503,185,503,186,503,186,502,187,502,188,503,189,503,189,503,190,503,192,503,192,503,192,503,192,503,192,504,193,506,193,507,194,509,194,510,194,510,195,510,196,511,197,512,197,512,197,512,198,514,196,515,196,515,196,516,197,517,197,517,196,518,193,518,192,518,191,521,192,521,191,521,191,522,191,522,192,523,192,523,192,524,191,523,190,523,189,526,190,525,189,527,189,526,188,525,188,526,188,527,188,527,188,527,187,526,186,527,186,527,185,527,185,528,184,528,184,527,184,527,183,528,183,527,182,528,182,529,181,528,181,527,181,528,180,528,180,528,179,529,179,529,179,530,177,530,177,529,177,527,177,529,176,530,176,530,175,529,174,529,173,529,172,529,172,528,173,528,170,528,168,528,166,527,165,527,164,527,163,527,162,526,162,526,162,526,161,524,160,525,159,525,159,525,158,524,157,524,157,524,156,523,153,522,151,521,151,521,151,521,151]
}
]
},
{
"code" : 4,
"name" : "宮城県",
"path" : [
{
"coords" : [518,192,518,191,521,192,521,191,522,195,521,193,520,195,521,196,519,196,519,197,519,197,520,199,520,199,520,199,519,199,519,199,517,200,518,201,519,201,519,202,518,203,519,204,519,203,520,204,520,205,519,205,519,205,519,205,519,206,519,206,518,207,519,207,520,207,519,208,519,208,519,208,520,210,519,210,518,210,518,210,518,209,517,209,517,208,517,208,516,208,513,207,512,208,512,210,510,210,510,209,511,209,510,208,509,209,509,209,509,210,509,210,510,210,510,210,509,211,507,213,507,222,506,222,505,222,505,223,505,224,504,225,503,225,504,225,502,225,501,223,499,222,497,222,496,222,496,221,496,220,495,220,494,220,494,220,492,220,492,220,492,220,492,219,492,219,492,218,493,218,495,217,495,216,496,215,496,214,496,212,497,210,497,210,498,210,498,209,499,208,499,206,499,205,498,204,498,201,499,201,499,201,499,200,500,198,499,196,498,195,498,194,500,194,501,193,502,193,503,192,503,192,503,192,503,192,504,193,506,193,507,194,509,194,510,194,510,195,510,196,511,197,512,197,512,197,512,198,514,196,515,196,515,196,516,197,517,197,517,196,518,193,518,192,518,192]
}
]
},
{
"code" : 5,
"name" : "秋田県",
"path" : [
{
"coords" : [506,152,506,154,506,155,506,157,504,160,504,164,504,166,505,167,503,167,503,167,503,168,504,169,504,169,503,170,503,171,503,171,504,172,503,174,502,175,502,175,502,176,501,177,501,179,500,180,501,181,501,182,501,183,503,185,503,185,503,186,503,186,502,187,502,188,503,189,503,189,503,190,503,192,503,192,503,192,503,192,502,193,501,193,500,194,498,194,498,194,497,194,496,193,495,192,495,192,494,191,494,191,494,190,493,190,493,191,491,190,491,190,490,189,489,190,488,189,487,188,487,188,485,188,484,188,484,188,484,187,484,186,484,186,484,185,484,184,485,183,486,181,487,170,486,168,485,166,486,166,487,167,487,165,486,165,486,165,485,164,485,162,486,161,485,163,485,164,485,166,483,167,482,167,481,167,480,166,480,163,481,164,482,165,485,161,486,156,486,153,485,152,485,152,486,152,486,152,486,151,487,151,488,151,489,152,493,151,493,151,493,150,495,150,495,151,498,152,499,152,500,152,501,152,502,151,503,151,503,150,504,150,505,152,506,152,506,152,506,152]
}
]
},
{
"code" : 6,
"name" : "山形県",
"path" : [
{
"coords" : [498,194,497,194,496,193,495,192,495,192,494,191,494,191,494,190,493,190,493,191,491,190,491,190,490,189,489,190,488,189,487,188,487,188,485,188,484,188,484,188,483,190,482,194,481,196,479,199,477,202,476,203,476,204,477,204,479,205,480,205,480,206,480,208,481,209,483,210,483,212,481,213,479,213,479,215,479,217,478,220,478,221,478,223,479,224,480,224,481,224,481,224,482,224,483,224,484,224,485,224,485,225,486,226,487,226,487,226,487,226,488,227,489,226,490,226,491,226,492,225,492,224,492,220,492,220,492,220,492,220,492,219,492,219,492,218,493,218,495,217,495,216,496,215,496,214,496,212,497,210,497,210,498,210,498,209,499,208,499,206,499,205,498,204,498,201,499,201,499,201,499,200,500,198,499,196,498,195,498,194,498,194,498,194]
}
]
},
{
"code" : 7,
"name" : "福島県",
"path" : [
{
"coords" : [504,225,505,224,505,223,505,222,506,222,507,222,508,226,508,228,509,230,509,235,509,241,509,242,508,244,508,247,508,249,507,249,506,249,505,250,504,251,503,251,501,251,500,250,499,249,499,251,498,252,497,253,496,253,494,252,492,249,491,247,491,247,490,246,490,246,489,245,484,243,482,245,480,246,477,247,474,248,473,249,472,250,469,249,469,247,469,245,469,243,468,242,467,240,468,239,469,238,469,237,469,236,469,235,471,235,472,234,473,233,474,233,476,234,476,232,476,230,476,229,477,229,478,228,478,227,479,226,480,225,480,224,480,224,481,224,481,224,482,224,483,224,484,224,485,224,485,225,486,226,487,226,487,226,487,226,488,227,489,226,490,226,491,226,492,225,492,224,492,220,492,220,494,220,494,220,495,220,496,220,496,221,496,222,497,222,499,222,501,223,502,225,504,225,503,225,504,225,504,225]
}
]
},
{
"code" : 8,
"name" : "茨城県",
"path" : [
{
"coords" : [503,255,502,257,501,261,500,262,500,264,500,265,500,266,499,268,499,269,500,275,501,277,502,277,502,278,503,279,504,281,505,283,505,283,504,283,503,281,501,280,500,279,499,278,498,278,497,279,496,278,495,279,494,279,494,279,493,280,491,280,489,280,489,280,488,280,484,277,482,275,481,273,481,274,480,273,479,270,479,270,482,268,483,267,484,266,485,266,485,265,487,265,487,265,488,264,488,264,489,264,490,265,490,264,491,262,491,261,491,261,491,258,491,257,492,256,492,255,492,254,492,253,492,252,492,249,492,249,494,252,496,253,497,253,498,252,499,251,499,249,500,250,501,251,503,251,504,251,504,253,503,255,503,255]
}
]
},
{
"code" : 9,
"name" : "栃木県",
"path" : [
{
"coords" : [489,245,490,246,490,246,491,247,491,247,492,249,492,249,492,252,492,253,492,254,492,255,492,256,491,257,491,258,491,261,491,261,491,262,490,264,490,265,489,264,488,264,488,264,487,265,487,265,485,265,485,266,484,266,483,267,482,268,479,270,479,270,478,269,477,268,475,268,473,267,472,266,472,263,472,262,473,261,474,260,473,259,471,258,471,256,471,255,471,254,472,253,472,252,472,252,472,250,472,250,473,249,474,248,477,247,480,246,482,245,484,243,489,245,489,245]
}
]
},
{
"code" : 10,
"name" : "群馬県",
"path" : [
{
"coords" : [467,248,468,249,469,249,472,250,472,250,472,250,472,252,472,252,472,253,471,254,471,255,471,256,471,258,473,259,474,260,473,261,472,262,472,263,472,266,473,267,475,268,477,268,478,269,479,270,477,270,475,270,474,270,471,269,471,269,470,269,467,268,465,270,464,271,464,272,464,272,463,272,462,273,462,273,461,273,459,274,457,275,456,276,456,276,455,276,454,273,455,273,454,272,453,270,454,271,454,270,454,269,454,268,454,267,455,267,454,264,453,264,451,264,449,263,450,260,450,259,451,258,451,257,452,257,452,256,452,256,456,255,456,255,457,254,457,254,458,255,459,253,460,253,460,252,462,252,462,250,463,251,463,248,465,247,465,246,466,246,467,248,467,248]
}
]
},
{
"code" : 11,
"name" : "埼玉県",
"path" : [
{
"coords" : [471,269,471,269,470,269,467,268,465,270,464,271,464,272,464,272,463,272,462,273,462,273,461,273,459,274,457,275,456,276,456,276,456,277,457,278,457,278,458,279,458,279,459,280,460,280,461,280,461,280,461,280,462,280,462,280,462,279,462,279,463,279,463,279,463,279,465,280,467,280,469,281,469,281,470,281,471,282,473,282,475,282,475,282,476,283,478,282,478,282,479,282,480,282,481,281,483,282,483,282,483,282,483,280,483,280,483,278,482,277,481,275,481,275,481,275,481,274,481,274,480,273,479,270,477,270,475,270,474,270,471,269,471,269]
}
]
},
{
"code" : 12,
"name" : "千葉県",
"path" : [
{
"coords" : [498,278,497,279,496,278,495,279,494,279,494,279,493,280,491,280,489,280,489,280,488,280,484,277,482,275,481,273,481,274,481,274,481,275,481,275,481,275,482,277,483,278,483,280,483,282,483,282,483,282,483,283,484,284,483,286,483,286,484,286,485,285,486,286,486,286,487,286,488,288,488,288,488,288,487,289,486,290,486,291,485,291,485,292,484,293,484,294,483,294,482,294,482,295,481,295,480,295,482,296,482,297,483,298,482,299,482,300,482,302,481,303,482,304,482,304,481,305,480,305,481,306,482,307,482,307,483,307,485,306,486,304,487,303,488,303,488,302,489,301,490,301,492,301,493,300,493,301,494,300,495,299,496,298,495,297,495,295,496,291,499,287,502,285,503,285,504,284,505,284,506,285,506,285,506,284,506,283,505,283,505,283,504,283,503,281,501,280,500,279,499,278,498,278,498,278]
}
]
},
{
"code" : 13,
"name" : "東京都",
"path" : [
{
"coords" : [481,281,483,282,483,283,484,284,483,286,483,286,483,286,483,286,483,286,482,286,481,286,481,287,481,289,480,289,479,289,479,289,479,289,478,288,476,287,475,286,475,287,474,287,473,287,474,287,474,288,474,288,474,288,474,289,474,290,473,290,470,287,466,285,466,285,466,285,466,285,466,285,465,285,462,282,461,280,461,280,462,280,462,280,462,279,462,279,463,279,463,279,463,279,465,280,467,280,469,281,469,281,470,281,471,282,473,282,475,282,475,282,476,283,478,282,478,282,479,282,480,282,481,281,481,281]
},
{
"name" : " 伊豆諸島",
"subpath" : [
{
"name" : "三宅島",
"coords" : [476,330,476,331,475,332,474,333,473,332,473,331,474,330,475,330,476,330,476,330]
},{
"name" : "御蔵島",
"coords" : [476,338,476,337,476,337,477,337,476,338,476,338]
},{
"name" : "八丈島",
"coords" : [481,358,482,359,482,360,482,361,482,362,482,361,481,361,480,360,480,359,481,358,481,358]
},{
"name" : "神津島",
"coords" : [465,326,466,326,466,327,466,328,465,328,465,326,465,326]
},{
"name" : "新島",
"coords" : [469,321,469,322,469,323,469,324,468,323,468,322,468,322,469,321,469,321]
},{
"name" : "大島",
"coords" : [472,311,473,312,473,313,471,313,470,311,472,311,472,311]
}
]
}
]
},
{
"code" : 14,
"name" : "神奈川県",
"path" : [
{
"coords" : [476,287,478,288,479,289,479,289,480,289,481,289,481,289,481,290,480,290,479,291,478,291,478,291,478,291,478,291,479,293,478,293,478,293,478,294,478,295,478,295,478,296,478,296,479,297,480,297,480,298,479,299,478,300,478,300,478,301,477,301,477,300,477,299,477,299,477,298,476,297,474,296,474,296,473,295,471,296,467,297,466,299,466,300,463,300,463,298,462,297,462,296,463,294,462,293,461,293,460,293,462,291,463,290,464,290,464,289,465,287,466,285,466,285,470,287,473,290,474,290,474,289,474,288,474,288,474,288,474,287,473,287,474,287,475,287,475,286,476,287,476,287]
}
]
},
{
"code" : 15,
"name" : "新潟県",
"path" : [
{
"coords" : [480,205,480,206,480,208,481,209,483,210,483,212,481,213,479,213,479,215,479,217,478,220,478,221,478,223,479,224,480,224,480,225,479,226,478,227,478,228,477,229,476,229,476,230,476,232,476,234,474,233,473,233,472,234,471,235,469,235,469,236,469,237,469,238,468,239,467,240,468,242,469,243,469,245,469,247,469,249,468,249,467,248,466,246,465,246,465,247,463,248,463,251,462,250,462,252,460,252,460,253,459,253,458,255,457,254,457,254,456,255,456,255,456,255,456,253,455,251,454,249,453,246,451,247,449,248,448,249,448,249,447,249,447,251,447,252,444,251,442,252,442,252,441,251,441,250,440,249,439,249,437,250,437,250,437,251,436,252,436,253,435,253,435,253,435,252,434,250,434,249,434,248,433,248,433,247,433,247,435,246,438,245,440,245,441,244,442,243,443,242,445,242,446,242,447,242,449,239,452,238,454,235,455,234,456,232,457,231,458,229,459,227,461,223,465,221,468,220,471,218,473,214,474,210,474,207,475,205,476,205,476,204,477,204,479,205,480,205,480,205]
},{
"name" : "佐渡島",
"coords" : [452,211,452,210,453,210,453,211,453,213,452,216,453,217,454,217,454,217,454,219,450,223,449,224,448,224,447,224,446,224,447,223,448,223,448,222,448,221,449,220,449,219,449,219,448,219,448,220,447,220,447,218,447,217,448,216,448,214,449,213,451,212,452,211,452,211]
}
]
},
{
"code" : 16,
"name" : "富山県",
"path" : [
{
"coords" : [413,266,413,266,414,264,415,264,416,264,416,265,416,266,416,266,417,266,418,265,419,263,421,262,421,262,422,262,424,261,424,262,425,262,426,262,427,263,428,263,430,264,430,264,431,264,431,264,431,263,431,263,431,263,432,262,432,261,432,260,433,260,433,260,433,259,434,258,435,256,435,255,435,253,435,253,436,253,435,253,435,253,435,252,434,250,434,249,434,248,434,248,433,248,433,247,431,247,428,248,427,249,427,250,427,251,426,252,425,252,423,253,421,252,420,252,418,250,418,249,419,248,419,247,418,247,415,249,415,250,414,251,414,252,414,253,414,253,413,253,413,253,413,254,413,255,413,256,413,258,413,259,413,260,412,261,412,262,413,263,412,264,412,266,413,266,413,266,413,266]
}
]
},
{
"code" : 17,
"name" : "石川県",
"path" : [
{
"coords" : [424,236,425,236,425,236,423,238,422,238,420,239,419,240,418,240,417,240,417,240,416,241,416,242,415,243,415,244,416,245,416,243,417,244,418,244,418,243,419,243,419,244,419,245,419,247,419,247,419,247,418,247,415,249,415,250,414,251,414,252,414,253,413,253,413,253,413,254,413,255,413,256,413,258,413,259,413,260,412,261,412,262,413,263,412,264,412,266,413,266,413,266,413,266,413,266,413,266,413,267,413,267,412,270,411,271,411,271,410,272,409,271,408,270,406,270,405,269,405,269,404,270,403,269,402,268,401,266,400,265,400,265,401,264,403,263,405,260,407,258,409,255,410,254,411,252,412,248,412,247,413,246,412,244,412,242,411,241,412,238,412,237,413,236,414,235,415,235,415,234,416,234,417,234,417,234,421,233,421,232,423,232,425,231,427,232,427,234,426,234,425,234,424,236,424,236]
},{
"name" : "能登島",
"coords" : [419,241,419,241,419,242,417,243,417,242,416,241,417,242,417,242,417,242,417,241,418,242,419,241,419,241]
}
]
},
{
"code" : 18,
"name" : "福井県",
"path" : [
{
"coords" : [401,266,402,268,403,269,404,270,405,269,405,269,406,270,408,270,409,271,410,272,411,271,410,273,410,276,412,276,412,278,411,279,409,280,408,280,408,279,403,280,401,280,400,281,400,282,400,282,399,283,398,282,397,282,397,283,396,285,395,286,394,286,393,287,391,287,390,289,389,290,388,290,386,291,384,290,381,289,381,288,380,288,380,287,380,286,380,285,381,284,381,285,381,285,381,285,381,285,381,286,383,286,385,285,385,286,384,287,385,287,387,287,386,286,386,286,386,284,387,284,389,286,388,285,389,284,389,285,389,284,389,283,389,283,388,283,389,282,389,283,390,284,390,283,391,284,392,283,392,282,392,281,392,281,393,280,394,280,394,281,394,282,394,282,395,282,395,280,394,277,393,276,393,275,393,274,393,274,393,273,395,270,397,268,397,266,399,265,400,265,400,265,401,266,401,266]
}
]
},
{
"code" : 19,
"name" : "山梨県",
"path" : [
{
"coords" : [460,280,459,280,458,279,458,279,457,278,457,278,457,278,456,279,455,279,454,279,453,278,451,278,450,278,450,277,449,277,447,277,446,279,445,279,444,281,444,282,444,282,443,283,443,284,444,285,444,285,444,285,444,285,445,287,445,288,445,291,445,294,445,295,446,295,447,295,448,296,448,298,449,299,450,299,451,298,451,296,452,292,453,293,454,293,455,293,455,294,455,294,457,294,461,293,461,293,460,293,462,291,463,290,464,290,464,289,465,287,466,285,466,285,465,285,462,282,461,280,460,280,460,280]
}
]
},
{
"code" : 20,
"name" : "長野県",
"path" : [
{
"coords" : [451,247,453,246,454,249,455,251,456,253,456,255,452,256,452,256,452,257,451,257,451,258,450,259,450,260,449,263,451,264,453,264,454,264,455,267,454,267,454,268,454,269,454,270,454,271,453,270,454,272,455,273,454,273,455,276,457,278,455,279,454,279,453,278,451,278,450,278,450,277,449,277,447,277,446,279,445,279,444,281,444,282,444,282,443,283,443,284,444,285,444,285,444,285,444,286,444,287,443,287,443,287,443,289,443,290,442,291,442,291,442,291,442,292,441,294,440,294,439,295,437,296,435,297,434,298,433,297,432,297,431,297,429,297,428,296,428,295,429,295,429,295,429,295,429,294,429,293,429,292,430,292,430,291,430,290,430,288,429,288,428,288,428,285,428,284,427,282,426,281,424,280,425,279,426,277,427,278,428,277,428,276,430,275,430,273,429,272,430,270,430,269,431,268,432,266,432,265,431,264,431,264,431,264,431,263,431,263,432,262,432,261,432,260,433,260,433,260,433,259,434,258,435,256,435,255,435,253,435,253,436,253,436,252,437,251,437,250,437,250,439,249,440,249,441,250,441,251,442,252,442,252,444,251,447,252,447,251,447,249,448,249,448,249,449,248,451,247,451,247]
}
]
},
{
"code" : 21,
"name" : "岐阜県",
"path" : [
{
"coords" : [425,262,424,262,424,261,422,262,421,262,419,263,418,265,417,266,416,266,416,266,416,265,416,264,415,264,414,264,413,266,413,266,413,266,413,267,413,267,413,267,412,270,411,271,411,271,410,273,410,276,412,276,412,278,411,279,409,280,408,280,408,279,403,280,401,280,400,281,400,282,400,282,399,283,399,284,400,285,401,287,402,286,402,287,402,290,401,293,402,296,402,295,402,296,403,295,404,295,405,296,406,297,407,298,408,299,408,299,408,298,408,296,408,295,408,295,409,293,411,292,414,291,415,291,415,291,416,292,417,293,418,294,419,295,420,295,421,295,423,295,424,296,425,296,426,297,427,296,429,295,429,295,429,295,429,294,429,293,429,292,430,292,430,291,430,290,430,288,429,288,428,288,428,285,428,284,427,282,426,281,424,280,425,279,426,277,427,278,428,277,428,276,430,275,430,273,429,272,430,270,430,269,431,268,432,266,432,265,431,264,431,264,430,264,430,264,428,263,427,263,426,262,425,262,425,262]
}
]
},
{
"code" : 22,
"name" : "静岡県",
"path" : [
{
"coords" : [454,293,453,293,452,292,451,296,451,298,450,299,449,299,448,298,448,296,447,295,446,295,445,295,445,294,445,291,445,288,444,285,444,285,444,285,444,285,444,286,444,287,443,287,443,287,443,289,443,290,442,291,442,291,442,291,442,292,441,294,440,294,439,295,437,296,435,297,434,298,434,299,435,299,434,300,434,300,433,301,433,301,432,302,431,304,430,305,430,306,429,307,428,308,427,308,426,310,426,313,426,313,426,313,428,313,428,312,428,310,428,309,428,311,429,310,430,309,429,310,429,312,430,311,429,312,429,313,430,313,432,314,434,314,440,314,444,316,444,315,443,314,444,312,445,311,446,310,447,308,448,307,449,306,450,305,451,305,451,304,451,304,451,304,451,303,451,303,452,302,454,301,456,301,459,302,459,304,458,304,457,304,457,307,457,309,456,310,457,311,456,311,456,312,456,313,456,313,457,314,457,315,458,316,459,316,461,314,462,314,462,314,463,312,464,311,464,310,465,309,466,308,466,306,465,305,465,305,465,304,464,303,465,301,463,300,463,298,462,297,462,296,463,294,462,293,461,293,461,293,457,294,455,294,455,294,455,293,454,293,454,293]
}
]
},
{
"code" : 23,
"name" : "愛知県",
"path" : [
{
"coords" : [429,297,431,297,432,297,433,297,434,298,435,297,434,298,434,299,435,299,434,300,434,300,433,301,433,301,433,301,432,302,431,304,430,305,430,306,429,307,428,308,427,308,426,310,426,312,426,313,426,313,426,313,426,313,419,315,415,315,416,313,417,313,418,313,420,312,421,312,422,311,422,311,422,312,422,312,422,312,422,311,422,311,422,309,421,309,420,309,419,309,419,310,418,309,416,309,415,309,414,308,414,307,414,305,413,306,413,308,414,310,414,312,411,310,411,309,412,308,411,306,411,304,412,302,412,301,411,302,411,302,411,301,410,301,409,301,409,301,409,300,408,299,408,299,408,299,408,298,408,296,408,295,408,295,409,293,411,292,414,291,415,291,415,291,416,292,417,293,418,294,419,295,420,295,421,295,423,295,424,296,425,296,426,297,427,296,429,295,428,295,428,296,429,297,429,297]
}
]
},
{
"code" : 24,
"name" : "三重県",
"path" : [
{
"coords" : [409,302,408,301,408,302,408,302,407,303,407,304,406,306,405,308,404,310,404,311,404,312,404,313,406,315,409,316,411,317,412,319,413,319,412,320,412,320,412,321,411,321,412,321,412,321,412,322,411,323,412,323,411,324,408,324,408,323,409,323,408,323,409,323,408,323,407,323,407,322,406,322,406,322,406,323,405,323,405,324,404,324,404,323,403,324,403,323,402,323,402,326,401,324,401,324,401,325,398,325,397,326,397,326,396,326,397,327,397,328,397,329,396,328,395,329,395,329,396,329,396,330,397,330,396,330,396,330,396,332,395,332,395,333,394,332,394,332,394,334,394,333,393,333,393,334,392,334,391,335,390,337,389,338,388,338,388,338,386,335,386,334,387,332,387,332,388,332,388,332,389,332,389,331,389,331,390,330,391,329,392,330,393,330,392,329,392,328,392,328,392,326,392,325,393,323,393,322,393,322,393,321,392,319,394,318,396,317,395,316,393,314,392,313,393,312,392,311,392,311,393,311,392,310,393,309,392,309,392,308,392,307,393,307,394,305,393,305,393,305,395,305,396,305,397,306,398,305,400,304,401,301,402,298,402,296,402,296,402,295,402,296,403,295,404,295,405,296,406,297,407,298,408,299,408,299,408,299,409,300,409,301,409,301,409,301,409,302,409,302]
}
]
},
{
"code" : 25,
"name" : "滋賀県",
"path" : [
{
"coords" : [396,282,397,282,397,282,397,282,397,282,397,282,397,282,399,282,399,282,399,283,399,283,399,283,399,284,400,285,401,287,402,286,402,287,402,290,401,293,402,296,402,296,402,298,401,301,400,304,398,305,397,306,396,305,395,305,393,305,393,305,394,305,393,307,392,307,392,308,391,307,392,307,391,306,390,305,390,305,389,305,388,303,388,302,387,299,388,296,388,295,388,293,386,291,388,290,389,290,390,289,391,287,393,287,394,286,395,286,396,285,397,283,396,282,396,282,396,282,396,282]
}
]
},
{
"code" : 26,
"name" : "京都府",
"path" : [
{
"coords" : [380,286,380,287,380,288,381,288,381,289,384,290,386,291,386,291,388,293,388,295,388,296,387,299,388,302,388,303,389,305,390,305,390,305,391,306,392,307,391,307,392,308,392,309,391,309,389,308,389,309,387,309,386,309,385,307,385,307,384,305,383,303,382,302,382,302,381,302,381,303,380,302,380,301,379,301,378,300,377,300,377,299,377,299,378,298,377,297,377,296,375,296,375,295,374,295,373,295,373,295,373,294,373,294,372,293,371,293,370,293,368,291,367,289,369,288,370,288,370,286,371,284,369,284,368,285,367,283,367,282,367,281,367,280,368,281,369,280,371,279,372,279,372,278,374,278,375,278,376,278,377,280,377,281,376,281,375,283,375,283,376,284,375,285,376,285,377,286,377,286,378,286,378,286,377,285,378,284,378,284,380,283,381,284,380,285,380,286,380,286]
}
]
},
{
"code" : 27,
"name" : "大阪府",
"path" : [
{
"coords" : [382,302,381,302,381,303,380,302,380,301,379,301,378,300,377,300,377,299,377,299,376,299,377,300,376,301,376,301,377,302,378,302,379,302,378,303,378,306,378,308,378,308,377,309,377,309,377,309,377,311,377,311,377,311,377,312,376,313,377,314,376,315,374,316,373,318,372,319,370,319,369,319,369,319,369,320,369,320,370,321,371,321,372,320,372,320,372,320,372,320,373,320,373,320,375,319,377,319,378,319,379,319,381,319,382,319,382,318,383,317,383,315,383,312,383,310,384,307,385,307,385,307,384,305,383,303,382,302,382,302,382,302]
}
]
},
{
"code" : 28,
"name" : "兵庫県",
"path" : [
{
"coords" : [367,282,367,283,368,285,369,284,371,284,370,286,370,288,369,288,367,289,368,291,370,293,371,293,372,293,373,294,373,294,373,295,373,295,374,295,375,295,375,296,377,296,377,297,378,298,377,299,376,299,377,300,376,301,376,301,377,302,378,302,379,302,378,303,378,306,378,308,377,309,377,309,376,309,375,308,375,309,373,309,372,309,371,310,367,310,365,308,363,307,362,306,360,305,359,306,359,305,358,305,356,305,355,305,355,305,355,306,354,306,353,306,352,306,351,306,351,305,351,305,351,303,350,302,351,301,351,300,351,300,351,299,351,298,352,297,353,294,354,294,354,293,355,291,356,291,357,291,357,290,357,288,357,288,357,287,356,286,356,285,356,282,356,281,356,280,358,280,359,280,360,280,360,280,361,280,362,280,363,280,363,280,364,280,365,280,367,281,367,282,367,282]
},{
"name" : "淡路島",
"coords" : [368,312,367,312,367,312,367,313,365,315,364,317,365,319,365,319,365,320,364,321,362,321,361,322,360,323,360,322,359,322,359,321,359,321,359,321,358,321,358,320,359,320,358,320,359,319,359,318,360,318,361,316,362,315,363,314,366,312,368,312,368,312]
}
]
},
{
"code" : 29,
"name" : "奈良県",
"path" : [
{
"coords" : [389,308,389,309,387,309,386,309,385,307,384,307,383,310,383,312,383,315,383,317,382,318,382,319,382,321,383,322,383,323,383,323,382,323,381,324,380,325,380,326,379,326,379,327,380,328,380,330,380,331,380,332,380,333,380,333,380,334,382,333,383,333,384,333,386,334,386,334,386,335,386,334,387,332,389,331,390,330,391,329,392,330,393,330,392,329,392,328,392,328,392,326,392,325,393,323,393,322,393,322,393,321,392,319,394,318,396,317,395,316,393,314,392,313,393,312,392,311,392,311,393,311,392,310,393,309,392,309,391,309,389,308,389,308]
}