From 73d4e9eadc4c3e0240facbb5c2789b74d90f63ad Mon Sep 17 00:00:00 2001 From: Massimiliano Marcon Date: Fri, 20 Nov 2015 16:31:54 +0100 Subject: [PATCH] Adds options to enable/disable map controls (zoombar, scalebar, mapsettings) --- dist/examples/index.html | 6 +- dist/jhere.js | 140 +++++++++++++++++++++++++-------------- dist/jhere.min.js | 2 +- dist/jhere.zip | Bin 8770 -> 9528 bytes examples/index.html | 4 +- package.json | 2 +- src/jhere.js | 2 +- src/modules/config.js | 3 +- src/modules/core.js | 22 ++++-- src/modules/poly.js | 57 ++++++++++++++++ src/modules/utils.js | 33 --------- 11 files changed, 175 insertions(+), 96 deletions(-) create mode 100644 src/modules/poly.js diff --git a/dist/examples/index.html b/dist/examples/index.html index f8937c6..e5c4f27 100644 --- a/dist/examples/index.html +++ b/dist/examples/index.html @@ -19,16 +19,16 @@
- + diff --git a/dist/jhere.js b/dist/jhere.js index cb77068..55f3245 100644 --- a/dist/jhere.js +++ b/dist/jhere.js @@ -66,12 +66,13 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - 'use strict'; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _modulesCore = __webpack_require__(1); + __webpack_require__(1); + + var _modulesCore = __webpack_require__(2); var _modulesCore2 = _interopRequireDefault(_modulesCore); @@ -79,6 +80,70 @@ /***/ }, /* 1 */ +/***/ function(module, exports) { + + /* + Copyright (c) 2015 Massimiliano Marcon, http://marcon.me + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + //Object.assign polyfill from + //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + 'use strict'; + + if (!Object.assign) { + Object.defineProperty(Object, 'assign', { + enumerable: false, + configurable: true, + writable: true, + value: function value(target) { + 'use strict'; + if (target === undefined || target === null) { + throw new TypeError('Cannot convert first argument to object'); + } + + var to = Object(target); + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) { + continue; + } + nextSource = Object(nextSource); + + var keysArray = Object.keys(nextSource); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + to[nextKey] = nextSource[nextKey]; + } + } + } + return to; + } + }); + } + +/***/ }, +/* 2 */ /***/ function(module, exports, __webpack_require__) { /* @@ -114,15 +179,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _loader = __webpack_require__(2); + var _loader = __webpack_require__(3); var _loader2 = _interopRequireDefault(_loader); - var _config = __webpack_require__(3); + var _config = __webpack_require__(4); var config = _interopRequireWildcard(_config); - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(5); var d = document; @@ -151,7 +216,7 @@ return new jHERE(element, options); } this.el = element; - this.options = (0, _utils.extend)(config.defaults, options); + this.options = Object.assign({}, config.defaults, options); this._init(); }; @@ -184,6 +249,8 @@ JH._makemap = function () { var self = this; var Behavior = H.mapevents.Behavior; + var enabled = self.options.enable; + self.platform = new H.service.Platform({ app_id: self.options.credentials.appId, app_code: self.options.credentials.authToken, @@ -191,7 +258,18 @@ }); self.layers = self.platform.createDefaultLayers(); self.map = new H.Map(self.el, self.layers.normal.map, self.options); - self.ui = new H.ui.UI(self.map); + self.ui = H.ui.UI.createDefault(self.map, self.layers); + + if (! ~enabled.indexOf('zoombar')) { + self.ui.getControl('zoom').setVisibility(false); + } + if (! ~enabled.indexOf('scalebar')) { + self.ui.getControl('scalebar').setVisibility(false); + } + if (! ~enabled.indexOf('settings')) { + self.ui.getControl('mapsettings').setVisibility(false); + } + //TODO: look at the options {enabled: Behavior.DRAGGING, Behavior.WHEELZOOM, Behavior.DBLTAPZOOM} new Behavior(new H.mapevents.MapEvents(self.map)); self.mc = new H.map.Group(); @@ -470,7 +548,7 @@ module.exports = exports['default']; /***/ }, -/* 2 */ +/* 3 */ /***/ function(module, exports) { /* @@ -548,7 +626,7 @@ module.exports = exports['default']; /***/ }, -/* 3 */ +/* 4 */ /***/ function(module, exports) { /* @@ -596,7 +674,8 @@ credentials: defaultCredentials, zoom: 12, center: { lat: 52.49, lng: 13.37 }, - type: 'map' + type: 'map', + enable: ['zoombar', 'scalebar', 'settings'] }; exports.defaults = defaults; @@ -618,56 +697,17 @@ exports.supportedEvents = supportedEvents; /***/ }, -/* 4 */ +/* 5 */ /***/ function(module, exports) { - /* - Copyright (c) 2015 Massimiliano Marcon, http://marcon.me - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); - exports.extend = extend; exports.isFn = isFn; exports.Runner = Runner; - function extend(target) { - target = target || {}; - - for (var _len = arguments.length, source = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - source[_key - 1] = arguments[_key]; - } - - source.forEach(function (s) { - Object.keys(s).forEach(function (k) { - target[k] = s[k]; - }); - }); - return target; - } - function isFn(f) { return typeof f === 'function'; } diff --git a/dist/jhere.min.js b/dist/jhere.min.js index cce013a..dc58f9e 100644 --- a/dist/jhere.min.js +++ b/dist/jhere.min.js @@ -1 +1 @@ -!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=c(1),f=d(e);window.jHERE=f["default"]},function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0});var f=c(2),g=e(f),h=c(3),i=d(h),j=c(4),k=document,l=function q(a,b){return this instanceof q?(this.el=a,this.options=j.extend(i.defaults,b),void this._init()):new q(a,b)},m=l.prototype,n=new g["default"],o=i.modules.map(function(a){return i.url.replace("M",a)}),p=new j.Runner;m._init=function(){var a=this,b=a.el.classList;b.contains(i.lib)||(a.el.classList.add(i.lib),p.run(function(){return a._makemap()}),n.started||n.require(o,k.querySelector('script[src*="jhere"]'),function(){return p.start()}).requireCss([i.uiCss]))},m._makemap=function(){var a=this,b=H.mapevents.Behavior;a.platform=new H.service.Platform({app_id:a.options.credentials.appId,app_code:a.options.credentials.authToken,useHTTPS:!0}),a.layers=a.platform.createDefaultLayers(),a.map=new H.Map(a.el,a.layers.normal.map,a.options),a.ui=new H.ui.UI(a.map),new b(new H.mapevents.MapEvents(a.map)),a.mc=new H.map.Group,a.map.addObject(a.mc)},m.center=function(a,b){var c=this;return p.run(function(){return c.map.setCenter(a,b)}),c},m.zoom=function(a,b){var c=this;return p.run(function(){return c.map.setZoom(a,b)}),c},m.type=function(a,b){var c=this;return a=a||"normal",b=b||"map",p.run(function(){return c.layers[a]&&c.layers[a][b]&&c.map.setBaseLayer(c.layers[a][b])}),c},m.on=function(a,b){var c=this,d=function(a){var d=a.currentPointer;c.map.getObjectAt(d.viewportX,d.viewportY)||(d&&(a.geo=c.map.screenToGeo(d.viewportX,d.viewportY)),b.call(c,a))};return p.run(function(){return c.map.addEventListener(a,d)}),c},m.off=function(a,b){var c=this;return p.run(function(){return c.map.removeEventListener(a,b,!0,c)}),c},m.marker=function(a,b){b=b||{};var c=this,d=function(){b.icon&&(b.crossOrigin=!0,b.icon=new H.map.Icon(b.icon,b));var d=new H.map.Marker(a,b);i.supportedEvents.forEach(function(a){b[a]&&d.addEventListener(a,b[a],!0,d)}),c.mc.addObject(d)};return p.run(d),c},m.nomarkers=function(){var a=this;return p.run(function(){return a.mc.removeAll()}),a},m.bubble=function(a,b){b=b||{};var c=this,d=function(){b.only&&c.nobubbles();var d=new H.ui.InfoBubble(a,b);j.isFn(b.onclose)&&d.addEventListener("statechange",function(){return"closed"===this.getState()&&b.onclose.call(this)}),c.ui.addBubble(d)};return p.run(d),c},m.nobubbles=function(){var a=this,b=function(){a.ui.getBubbles().forEach(function(a){return a.close()&&a.dipose()})};return p.run(b),a},m.originalMap=function(a){var b=this;return p.run(function(){return a.call(b,b.map,H)}),b},l.extend=function(a,b){"string"==typeof a&&j.isFn(b)&&(m[a]=b)},b["default"]=l,a.exports=b["default"]},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=document,d=function(){};d.prototype={require:function(a,b,c){var d=this;return d.started=!0,d.loadCount=0,d.totalRequired=a.length,d.target=b,d.callback=c,a.forEach(function(a){return d.writeScript(a)}),d},requireCss:function(a){var b=c.querySelector("head");return a.forEach(function(a){var d=c.createElement("link");d.rel="stylesheet",d.type="text/css",d.href=a,b.appendChild(d)}),this},loaded:function(){this.loadCount++,this.loadCount===this.totalRequired&&"function"==typeof this.callback&&this.callback.call()},writeScript:function(a){var b=this,d=c.createElement("script");d.async=!1,d.src=a,d.onload=b.loaded.bind(b),b.target.parentNode.insertBefore(d,b.target)}},b["default"]=d,a.exports=b["default"]},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c="_jHERE";b.lib=c;var d="https://js.api.here.com/v3/3.0/mapsjs-M.js";b.url=d;var e=d.replace("M.js","ui.css");b.uiCss=e;var f=["core","service","mapevents","ui"];b.modules=f;var g={appId:"lPY5MGHzyXJTYJXt2Sog",authToken:"qUtXEMHxFTwoz_WeIKbLrA"};b.defaultCredentials=g;var h={credentials:g,zoom:12,center:{lat:52.49,lng:13.37},type:"map"};b.defaults=h;var i="pointer",j="tap",k="drag",l="start",m="end",n="move",o=[i+"down",i+"up",i+n,i+"enter",i+"leave",i+"cancel",k+l,k,k+m,j,"dbl"+j,"longpress"];b.supportedEvents=o},function(a,b){"use strict";function c(a){a=a||{};for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;b>d;d++)c[d-1]=arguments[d];return c.forEach(function(b){Object.keys(b).forEach(function(c){a[c]=b[c]})}),a}function d(a){return"function"==typeof a}function e(){this._queue=[],this._done=!1}Object.defineProperty(b,"__esModule",{value:!0}),b.extend=c,b.isFn=d,b.Runner=e,e.prototype.run=function(a){return this._done?a():void this._queue.push(a)},e.prototype.start=function(){for(var a;a=this._queue.shift();)a();this._done=!0}}]); \ No newline at end of file +!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c(1);var e=c(2),f=d(e);window.jHERE=f["default"]},function(a,b){"use strict";Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert first argument to object");for(var b=Object(a),c=1;cf;f++){var h=e[f],i=Object.getOwnPropertyDescriptor(d,h);void 0!==i&&i.enumerable&&(b[h]=d[h])}}}return b}})},function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0});var f=c(3),g=e(f),h=c(4),i=d(h),j=c(5),k=document,l=function q(a,b){return this instanceof q?(this.el=a,this.options=Object.assign({},i.defaults,b),void this._init()):new q(a,b)},m=l.prototype,n=new g["default"],o=i.modules.map(function(a){return i.url.replace("M",a)}),p=new j.Runner;m._init=function(){var a=this,b=a.el.classList;b.contains(i.lib)||(a.el.classList.add(i.lib),p.run(function(){return a._makemap()}),n.started||n.require(o,k.querySelector('script[src*="jhere"]'),function(){return p.start()}).requireCss([i.uiCss]))},m._makemap=function(){var a=this,b=H.mapevents.Behavior,c=a.options.enable;a.platform=new H.service.Platform({app_id:a.options.credentials.appId,app_code:a.options.credentials.authToken,useHTTPS:!0}),a.layers=a.platform.createDefaultLayers(),a.map=new H.Map(a.el,a.layers.normal.map,a.options),a.ui=H.ui.UI.createDefault(a.map,a.layers),~c.indexOf("zoombar")||a.ui.getControl("zoom").setVisibility(!1),~c.indexOf("scalebar")||a.ui.getControl("scalebar").setVisibility(!1),~c.indexOf("settings")||a.ui.getControl("mapsettings").setVisibility(!1),new b(new H.mapevents.MapEvents(a.map)),a.mc=new H.map.Group,a.map.addObject(a.mc)},m.center=function(a,b){var c=this;return p.run(function(){return c.map.setCenter(a,b)}),c},m.zoom=function(a,b){var c=this;return p.run(function(){return c.map.setZoom(a,b)}),c},m.type=function(a,b){var c=this;return a=a||"normal",b=b||"map",p.run(function(){return c.layers[a]&&c.layers[a][b]&&c.map.setBaseLayer(c.layers[a][b])}),c},m.on=function(a,b){var c=this,d=function(a){var d=a.currentPointer;c.map.getObjectAt(d.viewportX,d.viewportY)||(d&&(a.geo=c.map.screenToGeo(d.viewportX,d.viewportY)),b.call(c,a))};return p.run(function(){return c.map.addEventListener(a,d)}),c},m.off=function(a,b){var c=this;return p.run(function(){return c.map.removeEventListener(a,b,!0,c)}),c},m.marker=function(a,b){b=b||{};var c=this,d=function(){b.icon&&(b.crossOrigin=!0,b.icon=new H.map.Icon(b.icon,b));var d=new H.map.Marker(a,b);i.supportedEvents.forEach(function(a){b[a]&&d.addEventListener(a,b[a],!0,d)}),c.mc.addObject(d)};return p.run(d),c},m.nomarkers=function(){var a=this;return p.run(function(){return a.mc.removeAll()}),a},m.bubble=function(a,b){b=b||{};var c=this,d=function(){b.only&&c.nobubbles();var d=new H.ui.InfoBubble(a,b);(0,j.isFn)(b.onclose)&&d.addEventListener("statechange",function(){return"closed"===this.getState()&&b.onclose.call(this)}),c.ui.addBubble(d)};return p.run(d),c},m.nobubbles=function(){var a=this,b=function(){a.ui.getBubbles().forEach(function(a){return a.close()&&a.dipose()})};return p.run(b),a},m.originalMap=function(a){var b=this;return p.run(function(){return a.call(b,b.map,H)}),b},l.extend=function(a,b){"string"==typeof a&&(0,j.isFn)(b)&&(m[a]=b)},b["default"]=l,a.exports=b["default"]},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=document,d=function(){};d.prototype={require:function(a,b,c){var d=this;return d.started=!0,d.loadCount=0,d.totalRequired=a.length,d.target=b,d.callback=c,a.forEach(function(a){return d.writeScript(a)}),d},requireCss:function(a){var b=c.querySelector("head");return a.forEach(function(a){var d=c.createElement("link");d.rel="stylesheet",d.type="text/css",d.href=a,b.appendChild(d)}),this},loaded:function(){this.loadCount++,this.loadCount===this.totalRequired&&"function"==typeof this.callback&&this.callback.call()},writeScript:function(a){var b=this,d=c.createElement("script");d.async=!1,d.src=a,d.onload=b.loaded.bind(b),b.target.parentNode.insertBefore(d,b.target)}},b["default"]=d,a.exports=b["default"]},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c="_jHERE";b.lib=c;var d="https://js.api.here.com/v3/3.0/mapsjs-M.js";b.url=d;var e=d.replace("M.js","ui.css");b.uiCss=e;var f=["core","service","mapevents","ui"];b.modules=f;var g={appId:"lPY5MGHzyXJTYJXt2Sog",authToken:"qUtXEMHxFTwoz_WeIKbLrA"};b.defaultCredentials=g;var h={credentials:g,zoom:12,center:{lat:52.49,lng:13.37},type:"map",enable:["zoombar","scalebar","settings"]};b.defaults=h;var i="pointer",j="tap",k="drag",l="start",m="end",n="move",o=[i+"down",i+"up",i+n,i+"enter",i+"leave",i+"cancel",k+l,k,k+m,j,"dbl"+j,"longpress"];b.supportedEvents=o},function(a,b){"use strict";function c(a){return"function"==typeof a}function d(){this._queue=[],this._done=!1}Object.defineProperty(b,"__esModule",{value:!0}),b.isFn=c,b.Runner=d,d.prototype.run=function(a){return this._done?a():void this._queue.push(a)},d.prototype.start=function(){for(var a;a=this._queue.shift();)a();this._done=!0}}]); \ No newline at end of file diff --git a/dist/jhere.zip b/dist/jhere.zip index 58e88694d1c629f98cdfb191833d89ecf222a46a..c8649ad0773c2d0c5a41f70d3d9080d5ecacab39 100644 GIT binary patch literal 9528 zcmaKSRZtvE+bka3-QC?Su()fmz~b)i1lQp10Ty?cKyYVqg1dWg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*)gTj*wlZmZ zPLZIoix7uNYi&^|D$oA}OBCSS=&N2?Zw8iG>aip7Dn04wvW;hCe?OKmCno`E+>jTs;3}#VHnsfgtvTdpQdtQ^|^k zoiTK$tRfnDA(<%^)D2;UwuzxzWC$9DK9Nz0W#|sa=^n#1LC!cHYAj3la(WD0Ieg5l zqN#uQrm2a|AbBt27x-Q9IcFxx*dG2fmrsk*!UzQD9qu9BS2J!GYy(YgX&}Z(oZVFd zddqSe`fLPpljyX3S(fT1N`5_fkvusVK1I%w2czUyGctR7F>ZRE9N;dYTZRjrt{Un4 zsSwqrP5Br0#v`)sPr(%pT}+^c=rfc=s)2uNoqM-54`hwrM3mMh8=a$Ft*soNHM!{A zxZEP-SKnKB5Z=w5LAYNc-XbaFn}%J|mDT3n1^soeqOKd@ki~)mFH{r{d$$ciM^V&% zMm1qeR%pUE(r^>kUizp}a~&X>6AC{|C%Cd0#gIMPY=w%pTH%)GFHlPd2!4P-b88_8 z007Pt002-+0Rk-p6aWYS2mrEjQb!22roELI000?Slcpp)AhL2&M}B}nb883y0L~Kt f03QGV000000000W0HlH57?S}dF$R_)00000DR`ws diff --git a/examples/index.html b/examples/index.html index 0194139..454a2b4 100644 --- a/examples/index.html +++ b/examples/index.html @@ -22,13 +22,13 @@ diff --git a/package.json b/package.json index 44f6083..92d49db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jHERE", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "Maps made easy.", "main": "index.js", "directories": { diff --git a/src/jhere.js b/src/jhere.js index 5d61cad..7fddb34 100644 --- a/src/jhere.js +++ b/src/jhere.js @@ -20,6 +20,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - +import './modules/poly'; import jHERE from './modules/core'; window.jHERE = jHERE; diff --git a/src/modules/config.js b/src/modules/config.js index 8177508..b7e4775 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -33,7 +33,8 @@ export const defaults = { credentials: defaultCredentials, zoom: 12, center: {lat: 52.49, lng: 13.37}, - type: 'map' + type: 'map', + enable: ['zoombar', 'scalebar', 'settings'] }; const pointer = 'pointer'; diff --git a/src/modules/core.js b/src/modules/core.js index 60d3cae..58e70b6 100644 --- a/src/modules/core.js +++ b/src/modules/core.js @@ -23,7 +23,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import Loader from './loader'; import * as config from './config'; -import {extend, isFn, Runner} from './utils'; +import {isFn, Runner} from './utils'; const d = document; @@ -37,7 +37,8 @@ const d = document; * app_id: 'your_app_id', * app_code: 'your_app_code' * zoom: 14, - * center: {lat: 52.5, lng: 13.3 + * center: {lat: 52.5, lng: 13.3, + * enable: ['zoombar', 'scalebar', 'settings'] * }}); * * @link https://developer.here.com/myapps @@ -52,7 +53,7 @@ const jHERE = function jHERE(element, options){ return new jHERE(element, options); } this.el = element; - this.options = extend(config.defaults, options); + this.options = Object.assign({}, config.defaults, options); this._init(); }; @@ -81,6 +82,8 @@ JH._init = function(){ JH._makemap = function(){ const self = this; const Behavior = H.mapevents.Behavior; + const enabled = self.options.enable; + self.platform = new H.service.Platform({ app_id: self.options.credentials.appId, app_code: self.options.credentials.authToken, @@ -88,7 +91,18 @@ JH._makemap = function(){ }); self.layers = self.platform.createDefaultLayers(); self.map = new H.Map(self.el, self.layers.normal.map, self.options); - self.ui = new H.ui.UI(self.map); + self.ui = H.ui.UI.createDefault(self.map, self.layers); + + if(!~enabled.indexOf('zoombar')) { + self.ui.getControl('zoom').setVisibility(false); + } + if(!~enabled.indexOf('scalebar')) { + self.ui.getControl('scalebar').setVisibility(false); + } + if(!~enabled.indexOf('settings')) { + self.ui.getControl('mapsettings').setVisibility(false); + } + //TODO: look at the options {enabled: Behavior.DRAGGING, Behavior.WHEELZOOM, Behavior.DBLTAPZOOM} new Behavior(new H.mapevents.MapEvents(self.map)); self.mc = new H.map.Group(); diff --git a/src/modules/poly.js b/src/modules/poly.js new file mode 100644 index 0000000..f4e14dc --- /dev/null +++ b/src/modules/poly.js @@ -0,0 +1,57 @@ +/* +Copyright (c) 2015 Massimiliano Marcon, http://marcon.me + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +//Object.assign polyfill from +//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign +if (!Object.assign) { + Object.defineProperty(Object, 'assign', { + enumerable: false, + configurable: true, + writable: true, + value: function(target) { + 'use strict'; + if (target === undefined || target === null) { + throw new TypeError('Cannot convert first argument to object'); + } + + var to = Object(target); + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) { + continue; + } + nextSource = Object(nextSource); + + var keysArray = Object.keys(nextSource); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + to[nextKey] = nextSource[nextKey]; + } + } + } + return to; + } + }); +} diff --git a/src/modules/utils.js b/src/modules/utils.js index 02f4c4e..0a41041 100644 --- a/src/modules/utils.js +++ b/src/modules/utils.js @@ -1,36 +1,3 @@ -/* -Copyright (c) 2015 Massimiliano Marcon, http://marcon.me - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -export function extend(target, ...source){ - target = target || {}; - source.forEach(function(s){ - Object.keys(s).forEach(function(k){ - target[k] = s[k]; - }); - }); - return target; -} - export function isFn(f){ return typeof f === 'function'; }