-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
141 lines (112 loc) · 5.38 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Interactive Turkey District Map — İnteraktif Türkiye İlçe Haritası</title>
<link rel="stylesheet" href="demo.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="turkey-map/style/style.css">
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="turkey-map/js/main.js"></script>
<!-- EXAMPLE JAVASCRIPT -->
<script type="text/javascript">
$(function(){
$('#turkey-map').on('click', '#turkey #Ankara #Keçiören', function() {
alert('Clicked Keçiören');
});
});
</script>
<!-- EXAMPLE JAVASCRIPT #end -->
<!-- EXAMPLE STYLE -->
<style>
.color1 {
fill: #ed145a !important;
}
.color2 {
fill: #0ea31a !important;
}
.color3 {
fill: #a7e3da !important;
}
</style>
<!-- EXAMPLE STYLE #end -->
</head>
<body>
<div id="turkey-map" data-map="districts" data-bg-color="#FFF5D0">
</div>
<div class="container-fluid demo text-center">
<p>(Some cities deleted because of demo. When you purchased that all cities and districts will be opened.)</p>
</div>
<div class="container-fluid dark">
<div class="container">
<div class="row buttons">
<div class="col-sm-6">
<h3>Detailed Vectorel Svg Turkey City & Districts Map</h3>
</div>
<div class="col-sm-6 text-right">
<a href="https://codecanyon.net/item/interactive-vectorel-turkey-districts-map-svg-js-html5/18747101" class="btn rounded">Purchase from CodeCanyon</a>
<a href="http://twitter.com/bqra" target="_blank" class="btn rounded">Ask Question</a>
</div>
</div>
</div>
</div>
<div class="container text-center">
<div class="card">
<h1>Turkey Districts Map <kbd>v1.0</kbd></h1>
<p>
This is districts svg map of Turkey. You can simply change the background color, map color or tooltip data. You can add different colors to each district or city. This map is created with Sketch app by me (<a href="http://twitter.com/bqra">Bora Dan</a>). Send a message to me for anything to learn about this map! I hope you enjoy.
</p>
</div>
<ul class="list text-left">
<li>Firstly; start with copy the <kbd>/turkey-map</kbd> folder to your project directory.</li>
<li>Add turkey-map css and javascript file paths in your <kbd><head></kbd> tag. <b>Example; </b><br><br>
<pre><link rel="stylesheet" href="turkey-map/style/style.css">
<script src="turkey-map/js/main.js"></script></pre>
</li>
<li>Now you are ready for show the map. Just add <kbd><div id="turkey-map"></div></kbd> in your html file that you want to show</li>
<li>Turkey Districts Map allows properties more than one. Simply you can add html5 data attribute for these. The list of properties; <br><br>
<kbd>data-map="districts"</kbd><br>
<samp>data-map attribute can get two values. 'districts' or 'city'. 'districts' shows districts name in tooltip. 'city' shows city name in tooltip.</samp><br><br>
<kbd>data-bg-color="#fff5d0"</kbd><br>
<samp>data-bg-color can change the background color for map background.</samp><br><br>
<kbd>data-map-color="#333333"</kbd><br>
<samp>data-map-color can change the map color.</samp>
</li>
<li>If you want to run your own javascript function when you clicked the city on the map you can add these jquery lines in your javascript file.<br><br>
<kbd>$('#turkey-map').on('click', '#turkey > g', function() {
<br> [your code] <br>
});</kbd>
<br>or <br>
<kbd>$('#turkey-map').on('click', '#turkey #Ankara', function() {<br> [your code] <br>});</kbd>
<br>or <br>
<kbd>$('#turkey-map').on('click', '#turkey #Ankara #Keçiören', function() {<br> [your code] <br>});</kbd>
</li>
<li>
If you want add different colors on cities or districts, you must add that colors as <kbd><color></kbd> element in <kbd><div id="turkey-map"></kbd> div element. <b>Example;</b><br><br>
<pre><div id="turkey-map" data-map="districts" data-bg-color="#FFF5D0">
<color id="Keçiören" data-color="color1"></color>
<color id="İstanbul" data-color="color2"></color>
<color id="İzmir" data-color="color3"></color>
</div></pre> <br>
Don't forget, before this, define your color classes in your .css file. <b>Example;</b><br><br>
<pre>.color1 { fill: #ed145a; }
.color2 { fill: #d7a35a; }</pre>
</li>
</ul>
</div>
<div class="container-fluid support">
<div class="container">
<div class="row buttons dark">
<div class="col-sm-6">
<h3>Free Lifetime Update & 6 Months Support</h3>
</div>
<div class="col-sm-6 text-right">
<a href="http://twitter.com/bqra" target="_blank" class="btn rounded">Ask Before Purchase via Twitter</a>
<a href="mailto:[email protected]" class="btn rounded">Ask Before Purchase via Email</a>
</div>
</div>
</div>
</div>
</body>
</html>