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

Commit

Permalink
Version 1.3.0 Released
Browse files Browse the repository at this point in the history
1- Can use a callback function for each marker infowindow close button element clicked.

2- Code Review.
  • Loading branch information
furcan committed Aug 19, 2019
1 parent 3fea374 commit 3752d9e
Show file tree
Hide file tree
Showing 8 changed files with 762 additions and 15 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Use highly customizable maps (Google Maps) with multiple custom Markers in your


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

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

```html
<script src="dist/markers-on-map-1.2.0.js"></script>
<script src="dist/markers-on-map-1.3.0.js"></script>
```

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

// v1.1.0 and next versions => optional => A callback function can be used when marker element clicked
// v1.1.0 and the next versions => optional => A callback function can be used when marker element clicked
markerCallback: null,

// v1.3.0 and the next versions => optional => A callback function can be used when marker infowindow close button element clicked
closeCallback: null,
}
],
});
Expand Down
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@1.3.0
* **Added:** Can use a callback function for each marker infowindow close button element clicked.
* **Changed:** Code Review.

-----
@1.2.0
* **Changed:** Code Review.

Expand Down
722 changes: 722 additions & 0 deletions dist/markers-on-map-1.3.0.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Markers On Map ('https://github.com/furcan/Markers-On-Map')
* Version: 1.2.0
* Version: 1.3.0
* Author: Furkan MT ('https://github.com/furcan')
* Copyright 2019 Markers On Map, MIT Licence ('https://opensource.org/licenses/MIT')*
*/
Expand Down
16 changes: 9 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<link id="FontMuli" href="https://fonts.googleapis.com/css?family=Muli:300,400,600,700,900&display=swap&subset=latin-ext" rel="stylesheet">
<link id="FontConsolas" href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&amp;subset=latin-ext" rel="stylesheet">

<link rel="stylesheet" href="index.css?v=1.2.0">
<link rel="stylesheet" href="index.css?v=1.3.0">

</head>

Expand All @@ -42,7 +42,7 @@

<div class="max-content">
<div class="head">
<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>
<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>
<p class="description">Use highly customizable maps (Google Maps) with multiple custom Markers.</p>
</div>

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

<code id="CodeJS">
<span class="label">JavaScript</span>
<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>
<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>
</code>

<code id="CodeInit">
Expand Down Expand Up @@ -215,7 +215,9 @@ <h2><i class="fas fa-chevron-down"></i>Advanced Usage</h2>
<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>
<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>

<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>
<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>

<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>

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

</div>

<script src="dist/markers-on-map-1.2.0.js"></script>
<script src="https://cdn.jsdelivr.net/npm/notiflix/dist/notiflix-aio-1.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/notiflix/dist/notiflix-aio-1.8.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://kit.fontawesome.com/833245c2e4.js"></script>
<script src="index-tooltip.js"></script>
<script src="index.js?v=1.2.0"></script>
<script src="dist/markers-on-map-1.3.0.js"></script>
<script src="index.js?v=1.3.0"></script>
</body>

</html>
19 changes: 17 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Markers On Map ('https://github.com/furcan/Markers-On-Map')
* Version: 1.2.0
* Version: 1.3.0
* Author: Furkan MT ('https://github.com/furcan')
* Copyright 2019 Markers On Map, MIT Licence ('https://opensource.org/licenses/MIT')*
*/
Expand All @@ -19,21 +19,36 @@ MarkersOnMap.Init({
markerTitle: 'This marker getting content from Google Places API',
markerContentFromGoogleQuery: 'Anitkabir',
markerCallback: function(){
Notiflix.Notify.Success('This is a callback.');
Notiflix.Notify.Success('This is a marker click callback. (Anitkabir)');
},
closeCallback: function(){
Notiflix.Notify.Info('This is a close button callback. (Anitkabir)');
},
},
{
markerLat: 39.935986,
markerLong: 32.802826,
markerTitle: 'This marker getting content from Google Places API',
markerContentFromGoogleQuery: 'Ataturk House',
markerCallback: function(){
Notiflix.Notify.Success('This is a marker click callback. (Ataturk House)');
},
closeCallback: function(){
Notiflix.Notify.Info('This is a close button callback. (Ataturk House)');
},
},
{
markerLat: 39.940516,
markerLong: 32.823702,
markerTitle: 'This marker has it\'s own custom content',
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>',
// markerContentFromGoogleQuery: 'Ataturk Culture Center',
markerCallback: function(){
Notiflix.Notify.Success('This is a marker click callback. (Custom Content)');
},
closeCallback: function(){
Notiflix.Notify.Info('This is a close button callback. (Custom Content)');
},
}
],
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "markers-on-map",
"main": "dist/markers-on-map-1.2.0.js",
"version": "1.2.0",
"main": "dist/markers-on-map-1.3.0.js",
"version": "1.3.0",
"description": "Use highly customizable maps (Google Maps) with multiple custom Markers in your web projects.",
"homepage": "https://github.com/furcan/Markers-On-Map",
"files": [
Expand Down
File renamed without changes.

0 comments on commit 3752d9e

Please sign in to comment.