Skip to content

Commit

Permalink
Merge pull request #16 from Abbe98/img-option
Browse files Browse the repository at this point in the history
add the controlCrosshairImg option to GeotagPhoto
  • Loading branch information
bertspaan authored Aug 14, 2019
2 parents fe5d87f + 41230af commit 40340db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ L.geotagPhoto.crosshair().addTo(map)

| Option | Type | Default | Description
|:----------------|:--------------|:------------------------------------------------------|:-------------|
| `crosshairHTML` | `HTML String` | `<img src="../images/crosshair.svg" width="100px" />` | HTML string of crosshair element |
| `crosshairHTML` | `HTML String` | `<img src="<url>" width="100px" />` | HTML string of crosshair element |
| `controlCrosshairImg` | `url` | `../images/crosshair.svg` | Crosshair image URL used by the default `crosshairHTML` |

### `L.GeotagPhoto.Camera`

Expand Down
3 changes: 2 additions & 1 deletion src/Leaflet.GeotagPhoto.Crosshair.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import L from 'Leaflet'

export default L.Evented.extend({
options: {
crosshairHTML: '<img alt="Center of the map; crosshair location" title="Crosshair" src="../images/crosshair.svg" width="100px" />'
controlCrosshairImg: '../images/crosshair-icon.svg',
crosshairHTML: '<img alt="Center of the map; crosshair location" title="Crosshair" src="' + options.controlCrosshairImg + '" width="100px" />'
},

initialize: function (options) {
Expand Down

0 comments on commit 40340db

Please sign in to comment.