Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 3752d9e

Browse files
committed
Version 1.3.0 Released
1- Can use a callback function for each marker infowindow close button element clicked. 2- Code Review.
1 parent 3fea374 commit 3752d9e

8 files changed

+762
-15
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Use highly customizable maps (Google Maps) with multiple custom Markers in your
88

99

1010
### Current Version
11-
1.2.0 [*](https://github.com/furcan/Markers-On-Map/blob/master/ReleaseNotes.md)
11+
1.3.0 [*](https://github.com/furcan/Markers-On-Map/blob/master/ReleaseNotes.md)
1212

1313
### Website and Demo
1414
https://furcan.github.io/Markers-On-Map/
@@ -31,7 +31,7 @@ yarn add markers-on-map
3131
#### 1- JavaScript
3232

3333
```html
34-
<script src="dist/markers-on-map-1.2.0.js"></script>
34+
<script src="dist/markers-on-map-1.3.0.js"></script>
3535
```
3636

3737
#### 2- Initialize (Basic)
@@ -229,8 +229,11 @@ MarkersOnMap.Init({
229229
// optional => infowindow from Google Places when marker clicked (if "googlePlacesApiEnabled" is true)
230230
markerContentFromGoogleQuery: 'Anitkabir',
231231

232-
// v1.1.0 and next versions => optional => A callback function can be used when marker element clicked
232+
// v1.1.0 and the next versions => optional => A callback function can be used when marker element clicked
233233
markerCallback: null,
234+
235+
// v1.3.0 and the next versions => optional => A callback function can be used when marker infowindow close button element clicked
236+
closeCallback: null,
234237
}
235238
],
236239
});

ReleaseNotes.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@1.3.0
2+
* **Added:** Can use a callback function for each marker infowindow close button element clicked.
3+
* **Changed:** Code Review.
4+
5+
-----
16
@1.2.0
27
* **Changed:** Code Review.
38

dist/markers-on-map-1.3.0.js

+722
Large diffs are not rendered by default.

index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Markers On Map ('https://github.com/furcan/Markers-On-Map')
3-
* Version: 1.2.0
3+
* Version: 1.3.0
44
* Author: Furkan MT ('https://github.com/furcan')
55
* Copyright 2019 Markers On Map, MIT Licence ('https://opensource.org/licenses/MIT')*
66
*/

index.html

+9-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<link id="FontMuli" href="https://fonts.googleapis.com/css?family=Muli:300,400,600,700,900&display=swap&subset=latin-ext" rel="stylesheet">
3030
<link id="FontConsolas" href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&amp;subset=latin-ext" rel="stylesheet">
3131

32-
<link rel="stylesheet" href="index.css?v=1.2.0">
32+
<link rel="stylesheet" href="index.css?v=1.3.0">
3333

3434
</head>
3535

@@ -42,7 +42,7 @@
4242

4343
<div class="max-content">
4444
<div class="head">
45-
<h1 class="logo" data-toggle="tooltip" title="Current Version: v1.2.0"><a href="https://furcan.github.io/Markers-On-Map/">Markers On Map<i class="fab fa-js-square"></i></a></h1>
45+
<h1 class="logo" data-toggle="tooltip" title="Current Version: v1.3.0"><a href="https://furcan.github.io/Markers-On-Map/">Markers On Map<i class="fab fa-js-square"></i></a></h1>
4646
<p class="description">Use highly customizable maps (Google Maps) with multiple custom Markers.</p>
4747
</div>
4848

@@ -67,7 +67,7 @@ <h2><i class="fas fa-chevron-down"></i>Basic Usage</h2>
6767

6868
<code id="CodeJS">
6969
<span class="label">JavaScript</span>
70-
<span class="l1"><span class="char">&lt;</span><span class="bool">script</span> <span class="fnc1">src</span>=<span><span class="str">"/Markers-On-Map/dist/markers-on-map-1.2.0.js"</span></span><span class="char">&gt;&lt;/</span><span class="bool">script</span><span class="char">&gt;</span></span>
70+
<span class="l1"><span class="char">&lt;</span><span class="bool">script</span> <span class="fnc1">src</span>=<span><span class="str">"/Markers-On-Map/dist/markers-on-map-1.3.0.js"</span></span><span class="char">&gt;&lt;/</span><span class="bool">script</span><span class="char">&gt;</span></span>
7171
</code>
7272

7373
<code id="CodeInit">
@@ -215,7 +215,9 @@ <h2><i class="fas fa-chevron-down"></i>Advanced Usage</h2>
215215
<span class="l1 l4"><span class="fnc1">markerContent:</span> <span class="bool">null</span>, <span class="cmmnt">// optional => custom html content infowindow when marker clicked</span></span>
216216
<span class="l1 l4"><span class="fnc1">markerContentFromGoogleQuery:</span> <span class="str">'Anitkabir'</span>, <span class="cmmnt">// optional => infowindow from Google Places when marker clicked (if "googlePlacesApiEnabled" is true)</span></span>
217217

218-
<span class="l1 l4" data-toggle="tooltip" title="v1.1.0 and next versions"><span class="fnc1">markerCallback:</span> <span class="bool">null</span>, <span class="cmmnt">// v1.1.0 and next versions => optional => A callback function can be used when marker element clicked</span></span>
218+
<span class="l1 l4" data-toggle="tooltip" title="v1.1.0 and the next versions"><span class="fnc1">markerCallback:</span> <span class="bool">null</span>, <span class="cmmnt">// v1.1.0 and next versions => optional => A callback function can be used when marker element clicked</span></span>
219+
220+
<span class="l1 l4" data-toggle="tooltip" title="v1.3.0 and the next versions"><span class="fnc1">closeCallback:</span> <span class="bool">null</span>, <span class="cmmnt">// v1.3.0 and next versions => optional => A callback function can be used when marker infowindow close button element clicked</span></span>
219221

220222
<span class="l1 l3">},</span>
221223
<span class="l1 l2">],</span>
@@ -233,12 +235,12 @@ <h2><i class="fas fa-chevron-down"></i>Advanced Usage</h2>
233235

234236
</div>
235237

236-
<script src="dist/markers-on-map-1.2.0.js"></script>
237-
<script src="https://cdn.jsdelivr.net/npm/notiflix/dist/notiflix-aio-1.7.1.min.js"></script>
238+
<script src="https://cdn.jsdelivr.net/npm/notiflix/dist/notiflix-aio-1.8.0.min.js"></script>
238239
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
239240
<script src="https://kit.fontawesome.com/833245c2e4.js"></script>
240241
<script src="index-tooltip.js"></script>
241-
<script src="index.js?v=1.2.0"></script>
242+
<script src="dist/markers-on-map-1.3.0.js"></script>
243+
<script src="index.js?v=1.3.0"></script>
242244
</body>
243245

244246
</html>

index.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Markers On Map ('https://github.com/furcan/Markers-On-Map')
3-
* Version: 1.2.0
3+
* Version: 1.3.0
44
* Author: Furkan MT ('https://github.com/furcan')
55
* Copyright 2019 Markers On Map, MIT Licence ('https://opensource.org/licenses/MIT')*
66
*/
@@ -19,21 +19,36 @@ MarkersOnMap.Init({
1919
markerTitle: 'This marker getting content from Google Places API',
2020
markerContentFromGoogleQuery: 'Anitkabir',
2121
markerCallback: function(){
22-
Notiflix.Notify.Success('This is a callback.');
22+
Notiflix.Notify.Success('This is a marker click callback. (Anitkabir)');
23+
},
24+
closeCallback: function(){
25+
Notiflix.Notify.Info('This is a close button callback. (Anitkabir)');
2326
},
2427
},
2528
{
2629
markerLat: 39.935986,
2730
markerLong: 32.802826,
2831
markerTitle: 'This marker getting content from Google Places API',
2932
markerContentFromGoogleQuery: 'Ataturk House',
33+
markerCallback: function(){
34+
Notiflix.Notify.Success('This is a marker click callback. (Ataturk House)');
35+
},
36+
closeCallback: function(){
37+
Notiflix.Notify.Info('This is a close button callback. (Ataturk House)');
38+
},
3039
},
3140
{
3241
markerLat: 39.940516,
3342
markerLong: 32.823702,
3443
markerTitle: 'This marker has it\'s own custom content',
3544
markerContent: '<h3 style="text-align:center;margin:0 0 10px;">Custom Marker Content</h3><p style="text-align:center; margin:0 0 10px;">Custom Marker Description</p><button onclick="Notiflix.Notify.Success(\'Custom Button Action\')" style="display:table;margin:auto;padding:8px 12px;border-radius:20px;font-weight:700;background:#502974;color:#fff;cursor:pointer;">Custom Button</button>',
3645
// markerContentFromGoogleQuery: 'Ataturk Culture Center',
46+
markerCallback: function(){
47+
Notiflix.Notify.Success('This is a marker click callback. (Custom Content)');
48+
},
49+
closeCallback: function(){
50+
Notiflix.Notify.Info('This is a close button callback. (Custom Content)');
51+
},
3752
}
3853
],
3954
});

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "markers-on-map",
3-
"main": "dist/markers-on-map-1.2.0.js",
4-
"version": "1.2.0",
3+
"main": "dist/markers-on-map-1.3.0.js",
4+
"version": "1.3.0",
55
"description": "Use highly customizable maps (Google Maps) with multiple custom Markers in your web projects.",
66
"homepage": "https://github.com/furcan/Markers-On-Map",
77
"files": [
File renamed without changes.

0 commit comments

Comments
 (0)