{"_id":"novicell-map","_rev":"32-7bb7fae6f4704ebe22d2d8ac704bf433","name":"novicell-map","description":"A simple component to load a single google map with a marker on it.","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"novicell-map","version":"1.0.0","description":"A simple component to load a single google map with a marker on it.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Novicell/novicell-map.git"},"keywords":["novicell","map","google"],"author":{"name":"Danni Larsen"},"license":"MIT","bugs":{"url":"https://github.com/Novicell/novicell-map/issues"},"homepage":"https://github.com/Novicell/novicell-map#readme","gitHead":"ba7db141238dbb7e8cc30f03b8e840739cc16dfe","_id":"novicell-map@1.0.0","_shasum":"2b8951247291bce6fdedd227cdebd67f6f2a04fa","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"dan9boi","email":"dla@novicell.dk"},"dist":{"shasum":"2b8951247291bce6fdedd227cdebd67f6f2a04fa","tarball":"https://registry.npmjs.org/novicell-map/-/novicell-map-1.0.0.tgz","integrity":"sha512-e9ELnf2DWcERqCHeuANszUxE6XaDWDg+z8sfim3G+zXgBJld8og834c9jObN2lv0mYJETw4XjZbMORbNfmIlwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCudnVFP8Oqs3EzRT/9ZxOVAxoWYKUxVw8wPz0Q518pzgIhAIzOuxlOqQF0fAqgHO2STg1yLnTjixINGCIhriAq9Nho"}]},"maintainers":[{"name":"dan9boi","email":"dla@novicell.dk"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/novicell-map-1.0.0.tgz_1493991592768_0.9021836235187948"},"directories":{}},"1.0.1":{"name":"novicell-map","version":"1.0.1","description":"A simple component to load a single google map with a marker on it.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Novicell/novicell-map.git"},"keywords":["novicell","map","google"],"author":{"name":"Danni Larsen"},"license":"MIT","bugs":{"url":"https://github.com/Novicell/novicell-map/issues"},"homepage":"https://github.com/Novicell/novicell-map#readme","gitHead":"0779a8a2ccdead029f24dc674616320b6f896074","_id":"novicell-map@1.0.1","_shasum":"5a66a4b06bddacbd55e1234763928cf55fad79b2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"dan9boi","email":"dla@novicell.dk"},"dist":{"shasum":"5a66a4b06bddacbd55e1234763928cf55fad79b2","tarball":"https://registry.npmjs.org/novicell-map/-/novicell-map-1.0.1.tgz","integrity":"sha512-PWz1qFxcvK/EI9YG1H75C8hnPswuJa7Ehfib4FxEgrPJNrzN/vHWkj+opFtdzGuwAtOfMj84BvxV5KyX4fy9iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwew8VtsVrGqdSWXRIVgmYTmaNNCA/Ekf7BkxueMOUHQIhAO07ayA/l5C4NzxMBE1HjwJ/9/hcy4nnBbuTlrcT0XC7"}]},"maintainers":[{"name":"dan9boi","email":"dla@novicell.dk"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/novicell-map-1.0.1.tgz_1494230144907_0.8055575417820364"},"directories":{}},"2.0.0":{"name":"novicell-map","version":"2.0.0","description":"A simple component to load a single google map with a marker on it.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Novicell/novicell-map.git"},"keywords":["novicell","map","google"],"author":{"name":"Danni Larsen"},"license":"MIT","bugs":{"url":"https://github.com/Novicell/novicell-map/issues"},"homepage":"https://github.com/Novicell/novicell-map#readme","gitHead":"a79ee9a94116ee1004e65b4d506676b9f87d4583","_id":"novicell-map@2.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-hNzXhkp8kjaIgp9sPd4YlERMuzFWfY+90plAfPCW9uKyeqs6r823FgdjwQIO8SnfCM0hKPKG98q8TxMIyd7Neg==","shasum":"f0c0a7a8fbf9c507b15f43412c2011df3e05dee6","tarball":"https://registry.npmjs.org/novicell-map/-/novicell-map-2.0.0.tgz","fileCount":6,"unpackedSize":46469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3UhpCRA9TVsSAnZWagAAY0wP/3aeMITptvsl3eNW0B5C\nheLwqlY+3IPdnh/0pAt5F82m3Zn4yH3HeCtiq9fCLnjSe7J5ehZV/3PlkMoE\ncwwhj/mxDYb2VNyyQAflaqjnMJx0NdfcvBchK6Z8nL/JotciqQglneGLYVxi\nj0OCMsd1Jd2N0aC2/Lv3CEygyru6hUh0oF5ATqb5QUtZUNiK6KDE+idjezkw\notoCuh9nJoynhUyhS+2Bfq37PSv+Ee3toL2DS52wVTo7CnhY2lPQYSc0oklF\ng2+8T7bBYNmb88kkRn0ky0RPRBxxA/MkLkTo1LhYqk9r1TSOT1bM42dBJdB9\nmzFLqkSAypzD/0IZ8LmI/nj8HyDAM93PACJuR0s9CSyWX1J8MCJTm9H+Lymx\nO72je634eWRFqA8xBaMBX97W4mRs4EFvni7agO4Z7nWu53gp24gyozbRPpeN\nbxclnVABfz5W9ar0lggPH0vPVNJ36oPYOreasNsZhgNU1LK+XMPZFfFM+V3o\njWQYz2VzVsX7I9N5bU0DCQSr7rKXhoO9sjq4+iQMn5b0VEr1XFV9KQqHe6pj\n5A07to0qnziwK4SQJ8hpRnQ1iKQyo1VQnEk/Wc5dpc+Q5luBFk9kBZxr/SZ9\n67VNzIjzhtm5lgbYHP41mUaZiWN6qEw8oeffPSmRQQ9LLNmHCArqi4hEDt5u\ndkfO\r\n=p3Uz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWMAwSnTnKNWAhqt59w2Royc26lcV/cupQCkKDR0cUQQIgfWQFOTwAA8AHGLQyfMsQy2oHcy5l4aFdJo3jYB3thdU="}]},"maintainers":[{"email":"aneke1234@gmail.com","name":"ankeris"},{"email":"bjornnyborg@hotmail.com","name":"bjornnyborg"},{"email":"bsj@novicell.dk","name":"bsjnovicell"},{"email":"dla@novicell.dk","name":"dan9boi"},{"email":"ean@novicell.dk","name":"emiank"},{"email":"era@novicell.dk","name":"emilras"},{"email":"hrmadsen89@gmail.com","name":"heense"},{"email":"hsc@novicell.dk","name":"henriksch"},{"email":"jonashavmoeller@gmail.com","name":"jhavmoeller"},{"email":"sergi.serch@gmail.com","name":"sergi_smj"}],"_npmUser":{"name":"dan9boi","email":"dla@novicell.dk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/novicell-map_2.0.0_1558005865064_0.8746258840151795"},"_hasShrinkwrap":false}},"readme":"# Novicell Map\r\n**A simple component to lazy load a single google map with a marker on it.**\r\n\r\n## Usage\r\n\r\nWritten in pure Vanilla JS, it has *no dependencies*, and is easy to implement with the [novicell-frontend setup](https://github.com/Novicell/novicell-frontend).\r\n\r\n## Requirements\r\n\r\nTo use this you need a [Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key).\r\n\r\nFor this component to be smart, it need something to get the LAT, LNG and ZOOMLEVEL, for the marker, and append it to the map-element, as data-attibutes.\r\n\r\n**Here's some plugin suggestions for some of the popular CMS's:**\r\n- [Umbraco](https://our.umbraco.org/projects/backoffice-extensions/angulargooglemaps)\r\n- [Drupal](https://www.drupal.org/project/gmap)\r\n- [Wordpress](http://www.advancedcustomfields.com/resources/google-map/)\r\n\r\n### Install with npm\r\n\r\n```bash\r\nnpm install novicell-map --save\r\n```\r\n\r\n## Setup\r\n\r\nFirst add an HTML elemnt and set `data-lat`, `data-lng` and `data-zoom`, and set a height for your map with CSS (inline css is just for demo):\r\n\r\n**Markup**\r\n```html\r\n<div style=\"height:300px;\" id=\"map-canvas\" data-lat=\"56.109574\" data-lng=\"10.155361\" data-zoom=\"15\"></div>\r\n```\r\n\r\nThen include the js file in your js bundle or in your HTML:\r\n\r\n**JS bundle**\r\n```javascript\r\nscripts: [\r\n    vendorPath + \"novicell-map/js/novicell.map.js\"\r\n    ...\r\n]\r\n```\r\n\r\n**HTML**\r\n```html\r\n    <script src=\"/node_modules/novicell-map/js/novicell.map.js\"></script>\r\n```\r\n\r\nThen call the `init`-method with an apikey and a selector, from your `master.js`-file:\r\n```javascript\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n    novicell.map.init({\r\n        apiKey: 'YOUR API KEY HERE',\r\n        selector: '#map-canvas'\r\n    });\r\n});\r\n```\r\n\r\n## Options\r\n```javascript\r\nnovicell.map.init({\r\n    apiKey: 'YOUR API KEY HERE',\r\n    selector: '#map-canvas',\r\n    title: 'Novicell HQ international',              \r\n    icon: {\r\n      url: 'test-pin.png',\r\n      size: {\r\n        width: 50,\r\n        height: 50\r\n      }\r\n    },\r\n    infoWindow: '<div class=\"marker-content\">' +\r\n      '<div class=\"siteNotice\">' +\r\n      '</div>' +\r\n      '<h1 class=\"marker-content-header\">Novicell HQ</h1>' +\r\n      '<div class=\"marker-content-body\">' +\r\n      '<p><b>Office hours:</b><br />8.00am – 4.00pm</p>' +\r\n      '<p><b>Phone</b><br />+45 8619 0550</p>' +\r\n      '<p><b>Email</b><br /><a href=\"mailto:info@novicell.dk\" title=\"Send us an email\">test@novicell.dk</a></p>' +\r\n      '<p><strong>Novicell Aarhus</strong><br />Søren Nymarks Vej 6<br />8270 Højbjerg</p>' +\r\n      '</div>' +\r\n      '</div>',\r\n    mapOptions: {\r\n      disableDefaultUI: false,\r\n      draggable: false,\r\n      scrollwheel: false,\r\n      styles: [{ \"featureType\": \"administrative\", \"elementType\": \"labels.text.fill\", \"stylers\": [{ \"color\": \"#444444\" }] }, { \"featureType\": \"landscape\", \"elementType\": \"all\", \"stylers\": [{ \"color\": \"#f2f2f2\" }] }, { \"featureType\": \"landscape.man_made\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"landscape.natural.landcover\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"poi\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"poi.attraction\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }, { \"weight\": \"0.64\" }] }, { \"featureType\": \"poi.park\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }, { \"lightness\": \"19\" }, { \"saturation\": \"0\" }] }, { \"featureType\": \"poi.place_of_worship\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"road\", \"elementType\": \"all\", \"stylers\": [{ \"saturation\": -100 }, { \"lightness\": 45 }, { \"visibility\": \"on\" }] }, { \"featureType\": \"road.highway\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }] }, { \"featureType\": \"road.arterial\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }] }, { \"featureType\": \"road.arterial\", \"elementType\": \"labels.icon\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"road.local\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"transit\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"transit.line\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }, { \"saturation\": \"0\" }, { \"lightness\": \"41\" }, { \"gamma\": \"1.27\" }] }, { \"featureType\": \"transit.station.airport\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"transit.station.bus\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }, { \"hue\": \"#ff0000\" }] }, { \"featureType\": \"transit.station.rail\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }, { \"saturation\": \"23\" }, { \"lightness\": \"0\" }] }, { \"featureType\": \"water\", \"elementType\": \"all\", \"stylers\": [{ \"color\": \"#d3f3f4\" }, { \"visibility\": \"on\" }] }, { \"featureType\": \"water\", \"elementType\": \"labels\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"water\", \"elementType\": \"labels.text\", \"stylers\": [{ \"color\": \"#ffffff\" }, { \"weight\": \"0.01\" }, { \"visibility\": \"off\" }] }]\r\n    }\r\n});\r\n```\r\n\r\n\r\n## Extension\r\n\r\nWhen extending the script, make sure to make a singleton for the `novicell` and the `novicell.map` objects before adding your own methods.\r\n\r\n```javascript\r\n'use strict';\r\n\r\nvar novicell = novicell || {};\r\nnovicell.map = novicell.map || {};\r\nnovicell.map.extentions = novicell.map.extentions || new function () {\r\n    this.test = function() {\r\n        console.log('test');\r\n    };\r\n}();\r\n```\r\nNext you need to include your js-files in your js bundle or in your HTML, and then call the `init`-method from your `master.js`.\r\nMake sure to load you:\r\n\r\n**JS bundle**\r\n```javascript\r\nscripts: [\r\n    vendorPath + \"novicell-map/js/novicell.map.js\"\r\n    projectPath + \"/components/novicell.map.extentions.js\"\r\n    ...\r\n]\r\n```\r\n\r\n**HTML**\r\n```html\r\n    <script src=\"/node_modules/novicell-map/js/novicell.map.js\"></script>\r\n    <script src=\"/scripts/components/novicell.map.extentions.js\"></script>\r\n```\r\n\r\nThen call the `test`-method from your `master.js`:\r\n```javascript\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function() {\r\n    novicell.map.init();\r\n    novicell.map.extentions.test();\r\n    ...\r\n});\r\n```\r\n\r\n## License\r\nThe Novicell Map is licensed under the MIT Open Source license.","maintainers":[{"email":"dla@novicell.dk","name":"dan9boi"},{"email":"era@novicell.dk","name":"emilras"},{"email":"hrmadsen89@gmail.com","name":"heense"},{"email":"jonashavmoeller@gmail.com","name":"jhavmoeller"},{"email":"hotepp@pm.me","name":"hotepp"},{"email":"ean@novicell.dk","name":"emiank"},{"email":"luka.gurovic98@gmail.com","name":"ozzy1312"},{"email":"simoneldevig@gmail.com","name":"simoneldevig"},{"email":"ems@novicell.dk","name":"emilostervig"}],"time":{"modified":"2022-06-22T06:31:03.218Z","created":"2017-05-05T13:39:54.298Z","1.0.0":"2017-05-05T13:39:54.298Z","1.0.1":"2017-05-08T07:55:46.398Z","2.0.0":"2019-05-16T11:24:25.227Z"},"homepage":"https://github.com/Novicell/novicell-map#readme","keywords":["novicell","map","google"],"repository":{"type":"git","url":"git+https://github.com/Novicell/novicell-map.git"},"author":{"name":"Danni Larsen"},"bugs":{"url":"https://github.com/Novicell/novicell-map/issues"},"license":"MIT","readmeFilename":"README.md","users":{"dan9boi":true}}