Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 0 additions & 76 deletions debug/filter.js

This file was deleted.

60 changes: 60 additions & 0 deletions debug/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<head>
<title>Mapbox-gl-geocoder</title>
<script src="./../bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/1.4.0/mapbox-gl.js"></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.css' rel='stylesheet' />
<link rel='stylesheet' href="./../lib/mapbox-gl-geocoder.css" />
<style>
#map {
height: 100%;
width: 100%;
}
</style>
</head>

<body>
<div id='map'></div>
<h1>Hi</h1>
</body>

<script>

mapboxgl.accessToken = window.localStorage.getItem('MapboxAccessToken');

var map = new mapboxgl.Map({
container: "map",
style: 'mapbox://styles/mapbox/streets-v9',
center: [-79.4512, 43.6568],
zoom: 13
});

var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
trackProximity: true,
mapboxgl: mapboxgl
});

map.addControl(geocoder)


geocoder.on('results', function (e) {
console.log('results: ', e.features);
});

geocoder.on('result', function (e) {
console.log('result: ', e.result);
});

geocoder.on('clear', function (e) {
console.log('clear');
});

geocoder.on('loading', function (e) {
console.log('loading:', e.query);
});

geocoder.on('error', function (e) {
console.log('Error is', e.error);
});

</script>
128 changes: 0 additions & 128 deletions debug/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"unpkg": "dist/mapbox-gl-geocoder.min.js",
"style": "lib/mapbox-gl-geocoder.css",
"scripts": {
"start": "budo debug/index.js --live -- -t brfs ",
"start": "budo lib/index.js:bundle.js --live -- -t brfs --standalone MapboxGeocoder lib/index.js",
"prepublish": "NODE_ENV=production && mkdir -p dist && browserify --standalone MapboxGeocoder lib/index.js | uglifyjs -c -m > dist/mapbox-gl-geocoder.min.js && cp lib/mapbox-gl-geocoder.css dist/",
"test": "browserify -t envify test/index.js test/events.test.js | smokestack -b firefox | tap-status | tap-color",
"docs": "documentation build lib/index.js --format=md > API.md",
Expand Down