Skip to content

Commit

Permalink
Plugin rebranding to Mapzen
Browse files Browse the repository at this point in the history
  • Loading branch information
louh committed Dec 7, 2015
1 parent e2bf5e7 commit fb96c78
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 61 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
@@ -1,22 +1,22 @@
## v1.2.0 (December 1, 2015)

- **Added events.** The geocoder now fires the following events that can be subscribed to: `results`, `error`, `select`, `highlight`, `expand`, `collapse` and `reset`. These allow applications to respond to interactions with the plugin, and will also pass along relevant data (like address labels and latitude/longitude pairs) received from the geocoder. [See the README for more information.](https://github.com/pelias/leaflet-geocoder/blob/master/README.md#events) ([#40](https://github.com/pelias/leaflet-geocoder/issues/40), [#75](https://github.com/pelias/leaflet-geocoder/issues/75))
- **Added events.** The geocoder now fires the following events that can be subscribed to: `results`, `error`, `select`, `highlight`, `expand`, `collapse` and `reset`. These allow applications to respond to interactions with the plugin, and will also pass along relevant data (like address labels and latitude/longitude pairs) received from the geocoder. [See the README for more information.](https://github.com/mapzen/leaflet-geocoder/blob/master/README.md#events) ([#40](https://github.com/mapzen/leaflet-geocoder/issues/40), [#75](https://github.com/mapzen/leaflet-geocoder/issues/75))
- Simplified test procedure so that it no longer requires a global install of [`jake`](http://jakejs.com/) and tests can be run locally with a standard `npm test` command.
- Fixed a bug where pressing the up and down keys will throw errors when the results list is empty.
- DEMO: Update [Refill](https://github.com/tangrams/refill-style/) base map location.

## v1.1.0 (November 11, 2015)

- Added the ability for the `bounds` option to also accept rectangular bounds in simple Array form, which is expected of Leaflet methods that accept LatLngBounds objects.
- Improved results list so that when a user is navigating the list with the keyboard, results that are not in view will scroll into view. [#34](https://github.com/pelias/leaflet-geocoder/issues/34)
- Fixed falsy values on point and polygon icons not actually being disabled. (by [@bdon](https://github.com/bdon)) [#61](https://github.com/pelias/leaflet-geocoder/pull/61)
- Improved results list so that when a user is navigating the list with the keyboard, results that are not in view will scroll into view. [#34](https://github.com/mapzen/leaflet-geocoder/issues/34)
- Fixed falsy values on point and polygon icons not actually being disabled. (by [@bdon](https://github.com/bdon)) [#61](https://github.com/mapzen/leaflet-geocoder/pull/61)
- Fixed a bug where `scrollWheelZoom` is always enabled after some interactions with search results, if this option was previously disabled using `map.scrollWheelZoom.disable()`.
- Fixed result list z-index ordering for Leaflet v1-beta.2.
- Prevented result highlighting from inserting empty tags into the DOM when the input is blank.

## v1.0.1 (October 9, 2015)

- Fixed some inputs from being parsed as regex when highlighting results. [#25](https://github.com/pelias/leaflet-geocoder/issues/25)
- Fixed some inputs from being parsed as regex when highlighting results. [#25](https://github.com/mapzen/leaflet-geocoder/issues/25)
- DOCUMENTATION: Fixed badge links going to an old branch.
- DEMO: Change base map style.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -3,7 +3,7 @@ Contributing

## Reporting bugs

You can report bugs on the project's [issues tracker](https://github.com/pelias/leaflet-geocoder/issues).
You can report bugs on the project's [issues tracker](https://github.com/mapzen/leaflet-geocoder/issues).

Before filing an issue, please make sure that your bug is not caused by [Leaflet](http://leafletjs.com/)
or your application code (e.g. passing incorrect arguments to methods, etc.).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 pelias
Copyright (c) 2015 Mapzen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 18 additions & 18 deletions README.md
@@ -1,7 +1,7 @@
[![npm version](https://img.shields.io/npm/v/pelias-leaflet-geocoder.svg?style=flat-square)](https://www.npmjs.com/package/pelias-leaflet-geocoder)
[![CircleCI](https://img.shields.io/circleci/project/pelias/leaflet-geocoder.svg?style=flat-square)](https://circleci.com/gh/pelias/leaflet-geocoder/)
[![David devDependencies](https://img.shields.io/david/dev/pelias/leaflet-geocoder.svg?style=flat-square)](https://david-dm.org/pelias/leaflet-geocoder/#info=devDependencies)
[![Coverage Status](https://img.shields.io/coveralls/pelias/leaflet-geocoder.svg?style=flat-square)](https://coveralls.io/github/pelias/leaflet-geocoder?branch=master)
[![npm version](https://img.shields.io/npm/v/leaflet-geocoder-mapzen.svg?style=flat-square)](https://www.npmjs.com/package/leaflet-geocoder-mapzen)
[![CircleCI](https://img.shields.io/circleci/project/mapzen/leaflet-geocoder.svg?style=flat-square)](https://circleci.com/gh/mapzen/leaflet-geocoder/)
[![David devDependencies](https://img.shields.io/david/dev/mapzen/leaflet-geocoder.svg?style=flat-square)](https://david-dm.org/mapzen/leaflet-geocoder/#info=devDependencies)
[![Coverage Status](https://img.shields.io/coveralls/mapzen/leaflet-geocoder.svg?style=flat-square)](https://coveralls.io/github/mapzen/leaflet-geocoder?branch=master)

Leaflet + Mapzen Search geocoding plugin
========================================
Expand All @@ -10,11 +10,11 @@ A plugin that adds the ability to search (geocode) a Leaflet-powered map using [

## Requirements

Supports [Leaflet](https://github.com/Leaflet/Leaflet) **v0.7.3** (and higher) and **v1.0.0-beta.1** (and higher). (Previous Leaflet versions may work, but these are not targeted.) Browser support is IE8+, and for [more details, see below](https://github.com/pelias/leaflet-geocoder#browser-support).
Supports [Leaflet](https://github.com/Leaflet/Leaflet) **v0.7.3** (and higher) and **v1.0.0-beta.1** (and higher). (Previous Leaflet versions may work, but these are not targeted.) Browser support is IE8+, and for [more details, see below](https://github.com/mapzen/leaflet-geocoder#browser-support).

## Demo

[Click here](http://pelias.github.io/leaflet-geocoder/)
[Click here](http://mapzen.github.io/leaflet-geocoder/)

## Basic usage

Expand All @@ -25,9 +25,9 @@ Supports [Leaflet](https://github.com/Leaflet/Leaflet) **v0.7.3** (and higher) a
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="pelias-leaflet-geocoder.css">
<script src="pelias-leaflet-geocoder.js"></script>
<!-- Load geocoding plugin after Leaflet -->
<link rel="stylesheet" href="leaflet-geocoder-mapzen.css">
<script src="leaflet-geocoder-mapzen.js"></script>
```

**Step 2:** Initialize your Leaflet map
Expand Down Expand Up @@ -71,7 +71,7 @@ Here are a list all the settings and their default values.

### Query behavior

Some options affect the Pelias query itself.
Some options affect the Mapzen Search / Pelias query itself.

option | description | default value
----------- | ----------------------------------------- | ---------------------
Expand All @@ -87,7 +87,7 @@ These options affect the plugin's appearance and interaction behavior.
option | description | default value
----------- | ----------------------------------------- | ---------------------
**position** | _String_. Corner in which to place the geocoder control. Values correspond to Leaflet [control positions](http://leafletjs.com/reference.html#control-positions). | `'topleft'`
**attribution** | _String_. Attribution text to include for Pelias. Set to blank or `null` to disable. | `'Geocoding by <a href=\'https://mapzen.com/pelias\'>Pelias</a>'`
**attribution** | _String_. Attribution text to include. Set to blank or `null` to disable. | `'Geocoding by <a href=\'https://mapzen.com/projects/search/\'>Mapzen</a>'`
**placeholder** | _String_. Placeholder text to display in the search input box. Set to blank or `null` to disable. | `'Search'`
**title** | _String_. Tooltip text to display on the search icon. Set to blank or `null` to disable. | `'Search'`
**panToPoint** | _Boolean_. If `true`, highlighting a search result pans the map to that location. | `true`
Expand Down Expand Up @@ -166,7 +166,7 @@ L.control.geocoder('<your-api-key>', {

// Configure if you want to zoom/pan to a point while browsing the results (up/down arrows)
// panToPoint set to true (by default)
// as per https://github.com/pelias/leaflet-geocoder/issues/6
// as per https://github.com/mapzen/leaflet-geocoder/issues/6
L.control.geocoder('<your-api-key>', {
panToPoint: true
}).addTo(map);
Expand All @@ -179,20 +179,20 @@ L.control.geocoder('<your-api-key>', {

// Configure if you want to drop a pin for a search results or not
// by default - this is set to true
// as per https://github.com/pelias/leaflet-geocoder/issues/7
// as per https://github.com/mapzen/leaflet-geocoder/issues/7
L.control.geocoder('<your-api-key>', {
markers: false
}).addTo(map);

// Ability to collapse to a button instead of a expanded text box
// by default - this is set to false
// as per https://github.com/pelias/leaflet-geocoder/issues/7
// as per https://github.com/mapzen/leaflet-geocoder/issues/7
L.control.geocoder('<your-api-key>', {
expanded: false
}).addTo(map);

// Changing attribution
// By default, adds "Geocoding by Pelias" text with a link
// By default, adds "Geocoding by Mapzen" text with a link
// You can remove this if you like, or change the text.
L.control.geocoder('<your-api-key>', {
attribution: null
Expand Down Expand Up @@ -256,7 +256,7 @@ event | description
**collapse** | Fired when the geocoder is collapsed.
**reset** | Fired when the geocoder is reset ("x" button is clicked).

Here is [a demo of the events](http://pelias.github.io/leaflet-geocoder/examples/events.html).
Here is [a demo of the events](http://mapzen.github.io/leaflet-geocoder/examples/events.html).

#### Getting data

Expand Down Expand Up @@ -290,11 +290,11 @@ property | description

### Browser support

The Pelias-Leaflet geocoder supports all Leaflet-supported browsers _except_ for Internet Explorer 7. The plugin makes a cross-domain request in Javascript to obtain search results, which is not supported in IE7 without JSONP. Mapzen Search [does not support API requests in JSONP](https://mapzen.com/documentation/search/use-cors/#why-not-jsonp).
This plugin supports all Leaflet-supported browsers _except_ for Internet Explorer 7. It makes a cross-domain request in Javascript to obtain search results, which is not supported in IE7 without JSONP. Mapzen Search [does not support API requests in JSONP](https://mapzen.com/documentation/search/use-cors/#why-not-jsonp).

### Accessing other plugin internals

Properties and methods used internally by the geocoder are also available on the returned object. These are purposefully not private or obscured, but they are also not publicly documented right now, since functionality may fluctuate without notice. Depending on usage and demand we will lock down and document internal properties and methods for general use. [Please let us know in the issues tracker](https://github.com/pelias/leaflet-geocoder/issues) if you have feedback.
Properties and methods used internally by the geocoder are also available on the returned object. These are purposefully not private or obscured, but they are also not publicly documented right now, since functionality may fluctuate without notice. Depending on usage and demand we will lock down and document internal properties and methods for general use. [Please let us know in the issues tracker](https://github.com/mapzen/leaflet-geocoder/issues) if you have feedback.

## Projects using this plugin

Expand Down
9 changes: 5 additions & 4 deletions bower.json
@@ -1,12 +1,13 @@
{
"name": "pelias-leaflet-geocoder",
"version": "1.2.0",
"homepage": "https://github.com/pelias/leaflet-geocoder",
"name": "leaflet-geocoder-mapzen",
"version": "1.3.0",
"homepage": "https://github.com/mapzen/leaflet-geocoder",
"authors": [
"Harish Krishna",
"Lou Huang <lou@mapzen.com>"
],
"description": "Leaflet plugin that adds ability to search (geocode) using the Pelias Geocoder API.",
"main": "dist/pelias-leaflet-geocoder.js",
"main": "dist/leaflet-geocoder-mapzen.js",
"moduleType": [
"amd",
"globals",
Expand Down
File renamed without changes.
Expand Up @@ -33,7 +33,7 @@

options: {
position: 'topleft',
attribution: 'Geocoding by <a href=\'https://mapzen.com/pelias\'>Pelias</a>',
attribution: 'Geocoding by <a href=\'https://mapzen.com/projects/search/\'>Mapzen</a>',
url: 'https://search.mapzen.com/v1',
placeholder: 'Search',
title: 'Search',
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Expand Up @@ -13,7 +13,7 @@ The first way is that you can initialize a map with the option `zoomControl: fal
var map = L.map('map', { zoomControl: false });

// Add your geocoder control
L.control.geocoder('<pelias-api-key>').addTo(map);
L.control.geocoder('<your-api-key>').addTo(map);

// Add zoom control back
L.control.zoom().addTo(map);
Expand All @@ -26,7 +26,7 @@ Alternatively you can add a map as normal and use JavaScript to re-order your DO
var map = L.map('map');

// Add your geocoder control
var geocoder = new L.Control.Geocoder('<pelias-api-key>').addTo(map);
var geocoder = new L.Control.Geocoder('<your-api-key>').addTo(map);

// Re-sort control order so that geocoder is on top
// geocoder._container is a reference to the geocoder's DOM element.
Expand Down
4 changes: 2 additions & 2 deletions examples/bounds.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
</head>
Expand Down
4 changes: 2 additions & 2 deletions examples/events.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>
<link rel="stylesheet" href="examples.css">
<style>
#events-log {
Expand Down
4 changes: 2 additions & 2 deletions examples/index.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
</head>
Expand Down
4 changes: 2 additions & 2 deletions examples/leaflet-v1.html
Expand Up @@ -13,8 +13,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-hash/0.2.1/leaflet-hash.min.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
</head>
Expand Down
4 changes: 2 additions & 2 deletions examples/mapboxjs.html
Expand Up @@ -13,8 +13,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-hash/0.2.1/leaflet-hash.min.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
<style>
Expand Down
4 changes: 2 additions & 2 deletions examples/position.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
</head>
Expand Down
4 changes: 2 additions & 2 deletions examples/search-icon-active-state.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
<style>
Expand Down
4 changes: 2 additions & 2 deletions examples/tangram.html
Expand Up @@ -14,8 +14,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-hash/0.2.1/leaflet-hash.min.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<!-- Load Tangram -->
<script src="https://mapzen.com/tangram/tangram.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions examples/two-geocoders.html
Expand Up @@ -10,8 +10,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="../dist/pelias-leaflet-geocoder.css">
<script src="../dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="../dist/leaflet-geocoder-mapzen.css">
<script src="../dist/leaflet-geocoder-mapzen.js"></script>

<link rel="stylesheet" href="examples.css">
</head>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Expand Up @@ -19,8 +19,8 @@
<script src="https://mapzen.com/tangram/tangram.min.js"></script>

<!-- Load Pelias geocoding plugin after Leaflet -->
<link rel="stylesheet" href="./dist/pelias-leaflet-geocoder.css">
<script src="./dist/pelias-leaflet-geocoder.js"></script>
<link rel="stylesheet" href="./dist/leaflet-geocoder-mapzen.css">
<script src="./dist/leaflet-geocoder-mapzen.js"></script>

<style>
html, body {
Expand Down Expand Up @@ -97,7 +97,7 @@
// Add Tangram scene layer
var layer = Tangram.leafletLayer({
scene: 'https://cdn.rawgit.com/tangrams/refill-style/ef1259dbbcd5f47ad3e8bed1a27c4fcab9676b3c/refill-style.yaml',
attribution: 'Rendering by <a href="https://mapzen.com/tangram">Tangram</a> | &copy; OSM contributors | <a href="https://mapzen.com/">Mapzen</a>'
attribution: 'Rendering by <a href="https://mapzen.com/tangram">Tangram</a> | &copy; OSM contributors'
}).addTo(map);

// Adding a script block to post message to the parent container (think iframed demos)
Expand Down
12 changes: 6 additions & 6 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "pelias-leaflet-geocoder",
"version": "1.2.0",
"name": "leaflet-geocoder-mapzen",
"version": "1.3.0",
"description": "Leaflet plugin to search (geocode) using Mapzen Search or your own hosted version of the Pelias Geocoder API.",
"main": "dist/pelias-leaflet-geocoder.js",
"main": "dist/leaflet-geocoder-mapzen.js",
"directories": {
"example": "examples"
},
Expand All @@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/pelias/leaflet-geocoder.git"
"url": "https://github.com/mapzen/leaflet-geocoder.git"
},
"keywords": [
"leaflet",
Expand All @@ -27,9 +27,9 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/pelias/leaflet-geocoder/issues"
"url": "https://github.com/mapzen/leaflet-geocoder/issues"
},
"homepage": "https://github.com/pelias/leaflet-geocoder",
"homepage": "https://github.com/mapzen/leaflet-geocoder",
"peerDependencies": {
"leaflet": "^0.7.x || >=1.0.0-beta.1"
},
Expand Down

0 comments on commit fb96c78

Please sign in to comment.