diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 13:18:05 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 13:18:05 +0100 |
| commit | 7cf5c45341fad7c422364e80d87a86ecceeda144 (patch) | |
| tree | 533a6edb0c8bc7fb297aa0d598c6800bd5f6e390 /objects.js | |
| parent | 3d4a49c84cd5b01384e12424b4c5f347bd13f7ff (diff) | |
| download | snap-yow-7cf5c45341fad7c422364e80d87a86ecceeda144.tar.gz snap-yow-7cf5c45341fad7c422364e80d87a86ecceeda144.zip | |
add "my location" block and a nominatim search block
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -213,6 +213,12 @@ SpriteMorph.prototype.initBlocks = function () { category: 'map', spec: 'my location' }, + findLocation: { + type: 'reporter', + category: 'map', + spec: 'location of %s', + defaults: ['Tiergarten Berlin'] + }, focusMap: { type: 'command', category: 'map', @@ -1770,6 +1776,8 @@ SpriteMorph.prototype.blockTemplates = function (category) { if (cat === 'map') { blocks.push(block('reportUserLocation')); + blocks.push(block('reportMyLocation')); + blocks.push(block('findLocation')); blocks.push(block('focusMap')); blocks.push(block('moveTo')); @@ -3355,6 +3363,10 @@ SpriteMorph.prototype.moveTo = function (pos) { this.updateMarker(); }; +SpriteMorph.prototype.reportMyLocation = function () { + return new List([this.geoposition.lat, this.geoposition.lng]); +}; + // SpriteMorph motion primitives Morph.prototype.setPosition = function (aPoint, justMe) { |
