Ontimize Web Map
An implementation of leaflet map library for Ontimize Web.
Examples
Check out examples demo here
Installation
First you need to install map module dependencies (leaflet and plugin libraries):
npm install leaflet@1.0.1 leaflet-providers@1.1.16 leaflet-draw@0.3.2 dragula@3.7.2 ng2-dragula@1.2.2-0 --save
Do not forget to add typings as well
typings install leaflet --ambient -DA
Ensure that you have installed 'typings' node module globally with the same version of the one saved into the package.json of the application. For checking the version : typings -v For installing globally: npm install -g typings@0.8.1
After that, install the npm map module:
npm install ontimize-web-ng2-map --save
Usage
Finally, you can use ontimize-web-ng2-map in your Ontimize Web project.
Configure third party dependencies and map module (Angular-cli & SystemeJS)
Configure third party dependencies like this:
system-config.ts
const cliSystemConfigPackages: any = ;// ontimize map modulecliSystemConfigPackages['ontimize-web-ng2-map'] =
angular-cli-build.js
var Angular2App = require; module.exports = function ;
index.html Do not forget to include CSS style sheets
<link rel="stylesheet" type="text/css" href="./vendor/leaflet/dist/leaflet.css"> <link rel="stylesheet" type="text/css" href="./vendor/leaflet-draw/dist/leaflet.draw.css"> <link rel="stylesheet" type="text/css" href="./vendor/ontimize-web-ng2-map/o-map.css">
app.module.ts Include the library map module into your app.
...import