Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
663caec
Major Changes
cyphercodes Mar 4, 2018
294202e
Changed README
cyphercodes Mar 4, 2018
6cf354d
refactor: made options & mapOptions args optional
cyphercodes Mar 5, 2018
b199195
feat: deploy example directory with gh-pages
cyphercodes Mar 5, 2018
f3c3561
fix: example directory in gh-pages
cyphercodes Mar 5, 2018
ac662b5
fix: added docs to .gitignore
cyphercodes Mar 5, 2018
fe72a55
feat: update rollup to generate min.js UMD output
cyphercodes Mar 12, 2018
3284a2a
fix: removed docs folder
cyphercodes Mar 12, 2018
4a8101c
feat: added CDN link to example and README
cyphercodes Mar 13, 2018
08d292e
fix: Fixed package.json NPM properties & more..
cyphercodes Mar 13, 2018
aee80c0
feat: add jekyll page
cyphercodes Mar 13, 2018
1a3dfcb
fix: set jekyll theme in gh-pages branch
cyphercodes Mar 13, 2018
e6a18dc
fix: show downloads for jekyll
cyphercodes Mar 13, 2018
7031c58
fix: Improved README.md
cyphercodes Mar 13, 2018
41c56ef
fix: Fixed README
cyphercodes Mar 13, 2018
68c8a0b
feat: pass id or direct reference to element
cyphercodes Mar 16, 2018
a8287e4
docs: update README
cyphercodes Mar 16, 2018
2836293
fix: fix README
cyphercodes Mar 16, 2018
1b8243a
fix: fix README
cyphercodes Mar 16, 2018
48abec0
fix: Fix readme and updated example
cyphercodes Mar 16, 2018
69694dd
fix: Fixed README
cyphercodes Mar 17, 2018
5fb15f4
feat: Allow setting initial location
cyphercodes Mar 18, 2018
20ea717
fix: set example initial location to Montreal
cyphercodes Mar 18, 2018
79fd662
fix: setCurrentPos.. only if no initial position
cyphercodes Mar 18, 2018
650c2f1
fix: Fix lat,lng for Montreal in example
cyphercodes Mar 18, 2018
2267f48
fix: updated README
cyphercodes Mar 18, 2018
f62d081
fix: Fixed README - added badges
cyphercodes Mar 18, 2018
ee55a95
feat: add method to set location
cyphercodes Mar 22, 2018
042ed25
fix: Fixed dependencies
cyphercodes Apr 8, 2018
7d0496f
fix: allow latitude and longitude to be 0
jketterl Dec 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist
compiled
.awcache
.rpt2_cache
docs
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ notifications:
node_js:
- node
script:
- npm run test:prod && npm run build
- npm run build
after_success:
- npm run report-coverage
- npm run deploy-docs
- npm run semantic-release
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ These steps will guide you through contributing to this project:
- Fork the repo
- Clone it and install dependencies

git clone https://github.com/YOUR-USERNAME/typescript-library-starter
git clone https://github.com/YOUR-USERNAME/location-picker
npm install

Keep in mind that after running `npm install` the git repo is reset. So a good way to cope with this is to have a copy of the folder to push the changes, and the other to try them.
Make and commit your changes. Make sure the commands npm run build is working.

Make and commit your changes. Make sure the commands npm run build and npm run test:prod are working.

Finally send a [GitHub Pull Request](https://github.com/alexjoverm/typescript-library-starter/compare?expand=1) with a clear list of what you've done (read more [about pull requests](https://help.github.com/articles/about-pull-requests/)). Make sure all of your commits are atomic (one feature per commit).
Finally send a GitHub Pull Request with a clear list of what you've done (read more [about pull requests](https://help.github.com/articles/about-pull-requests/)). Make sure all of your commits are atomic (one feature per commit).
675 changes: 671 additions & 4 deletions LICENSE

Large diffs are not rendered by default.

294 changes: 184 additions & 110 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
theme: jekyll-theme-cayman
show_downloads: true
865 changes: 0 additions & 865 deletions docs/assets/css/main.css

This file was deleted.

7 changes: 0 additions & 7 deletions docs/assets/css/main.css.map

This file was deleted.

Binary file removed docs/assets/images/icons.png
Binary file not shown.
Binary file removed docs/assets/images/icons@2x.png
Binary file not shown.
Binary file removed docs/assets/images/widgets.png
Binary file not shown.
Binary file removed docs/assets/images/widgets@2x.png
Binary file not shown.
5 changes: 0 additions & 5 deletions docs/assets/js/main.js

This file was deleted.

3 changes: 0 additions & 3 deletions docs/assets/js/search.js

This file was deleted.

1,037 changes: 0 additions & 1,037 deletions docs/classes/dummyclass.html

This file was deleted.

1,161 changes: 0 additions & 1,161 deletions docs/globals.html

This file was deleted.

1,162 changes: 0 additions & 1,162 deletions docs/index.html

This file was deleted.

52 changes: 49 additions & 3 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
<meta charset="UTF-8">
<title>Example</title>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC5Jrp9PtHe0WapppUzxbIpMDWMAcV3qE4"></script>
<script src="https://unpkg.com/location-picker/dist/location-picker.min.js"></script>
<style type="text/css">
#map {
width: 100%;
height: 480px;
}
</style>
</head>

<body>
$END$
<div id="map"></div>
<br>
<button id="confirmPosition">Confirm Position</button>
<br>
<p>On idle position: <span id="onIdlePositionView"></span></p>
<p>On click position: <span id="onClickPositionView"></span></p>
<script>
// Get element references
var confirmBtn = document.getElementById('confirmPosition');
var onClickPositionView = document.getElementById('onClickPositionView');
var onIdlePositionView = document.getElementById('onIdlePositionView');
var map = document.getElementById('map');

// Initialize LocationPicker plugin
var lp = new locationPicker(map, {
setCurrentPosition: true, // You can omit this, defaults to true
lat: 45.5017,
lng: -73.5673
}, {
zoom: 15 // You can set any google map options here, zoom defaults to 15
});

// Listen to button onclick event
confirmBtn.onclick = function () {
// Get current location and show it in HTML
var location = lp.getMarkerPosition();
onClickPositionView.innerHTML = 'The chosen location is ' + location.lat + ',' + location.lng;
};

// Listen to map idle event, listening to idle event more accurate than listening to ondrag event
google.maps.event.addListener(lp.map, 'idle', function (event) {
// Get current location and show it in HTML
var location = lp.getMarkerPosition();
onIdlePositionView.innerHTML = 'The chosen location is ' + location.lat + ',' + location.lng;
});
</script>

</body>
</html>
Loading