diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index ad37b3a..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
index 2421ac0..e773f31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ node_modules
.tmp
.sass-cache
bower_components
+.DS_Store
diff --git a/README.markdown b/README.markdown
index 573b17a..80f0441 100644
--- a/README.markdown
+++ b/README.markdown
@@ -2,7 +2,7 @@
> AngularJS directives for Nokia Here Maps
-For pull requests please see branching strategy below!
+For pull requests please see branching strategy below!
Master (1.2.6): [](https://travis-ci.org/lukemarsh/angular-here-maps)
@@ -60,7 +60,10 @@ Add some configuration settings:
appCode: 'your Here Maps app code',
libraries: 'ui,mapevents,pano',
pixelRatio: 2, // Optional (Default: 1)
- pixelPerInch: 320 // Optional (Default: 72)
+ pixelPerInch: 320, // Optional (Default: 72)
+ useHTTPS: true,
+ zoomMax: 16,
+ zoomMin: 13
});
})
```
@@ -74,17 +77,116 @@ default center and zoom for the maps:
```js
$scope.map = {
zoom : 14,
- center : {
+ center : {
lng: -0.135559,
lat: 51.513872
}
};
```
+You can choose the map type: default `normal` and `satellite`:
+
+```html
+
+```
+
+```js
+$scope.map = {
+ zoom : 14,
+ center : {
+ lng: -0.135559,
+ lat: 51.513872
+ },
+ type: 'satellite'
+};
+```
+
+### Map Events
+
+#### onLoad Map
+
+```html
+
+```
+
+```js
+$scope.mapOnLoad = function(platform, map){
+ var center = map.getCenter();
+};
+```
+
+#### onTap Map
+
+```html
+
+```
+
+```js
+$scope.mapEventOnTap = function(event, platform, map){
+ // center map on tap
+ var coord = map.screenToGeo(event.currentPointer.viewportX, event.currentPointer.viewportY);
+ $scope.$apply(function(){
+ $scope.map.center = coord;
+ });
+};
+```
+
+#### onDoubleTap Map
+
+```html
+
+```
+
+```js
+$scope.mapEventOnDoubleTap = function(event, platform, map){
+ // center map on double tap
+ var coord = map.screenToGeo(event.currentPointer.viewportX, event.currentPointer.viewportY);
+ $scope.$apply(function(){
+ $scope.map.center = coord;
+ });
+};
+```
+
+#### onDragStart Map
+
+```html
+
+```
+
+```js
+$scope.mapEventOnDragStart = function(event, platform, map){
+
+};
+```
+
+#### onDrag Map
+
+```html
+
+```
+
+```js
+$scope.mapEventOnDrag = function(event, platform, map){
+
+};
+```
+
+#### onDragEnd Map
+
+```html
+
+```
+
+```js
+$scope.mapEventOnDragEnd = function(event, platform, map){
+
+};
+```
+
If you plan to hack on the directives or want to run the example, first thing to do is to install NPM dependencies:
```shell
-npm install #note bower install is run on post install
+npm install #note bower install is run on post install
```
### Building
@@ -117,13 +219,13 @@ The various directives are documented at [official site](http://lukemarsh.github
### Contributing
-Filing issues:
+Filing issues:
Prior to submiting an issue:
- Search open/**closed** issues, src examples (./examples), and gitter! **Again please search!**
- issues w/ plnkrs get attention quicker
-Pull requests more than welcome! If you're adding new features, it would be appreciated if you would provide some docs about the feature.
-This can be done either by adding a card to our [Waffle.io board](https://waffle.io/lukemarsh/angular-here-maps), forking the website
+Pull requests more than welcome! If you're adding new features, it would be appreciated if you would provide some docs about the feature.
+This can be done either by adding a card to our [Waffle.io board](https://waffle.io/lukemarsh/angular-here-maps), forking the website
branch and issuing a PR with the updated documentation page, or by opening an issue for us to add the documentation to the site.
### Branching Scheme
diff --git a/app/development/app.js b/app/development/app.js
index 923e2f2..90f7d2d 100644
--- a/app/development/app.js
+++ b/app/development/app.js
@@ -10,6 +10,9 @@ angular
appCode: 'WT6i13vXvx1JbFky92wqjg',
libraries: 'ui,mapevents,pano',
pixelRatio: 2,
- pixelPerInch: 320
+ pixelPerInch: 320,
+ useHTTPS: true,
+ zoomMax: 16,
+ zoomMin: 13
});
});
diff --git a/app/development/controllers/MapController.js b/app/development/controllers/MapController.js
index e7bf248..d2a17d5 100644
--- a/app/development/controllers/MapController.js
+++ b/app/development/controllers/MapController.js
@@ -7,18 +7,20 @@ angular.module('angular-here-maps-development')
$scope.windowContent = 'DEF';
$scope.map = {
zoom : 14,
- center : {
+ center : {
lng: -0.135559,
lat: 51.513872
- }
+ },
+ animation: true,
+ typeMap: 'normal' // normal || satellite
};
$scope.marker = {
coordinates : {
- lng: -0.14,
+ lng: -0.15,
lat: 51.513872
},
icon: {
- templateUrl: 'development/templates/icon test.html',
+ templateUrl: 'development/templates/icon.html',
window: {
template: 'hello'
},
@@ -48,7 +50,7 @@ angular.module('angular-here-maps-development')
lat: 51.513872
},
icon: {
- template: '
new icon
'
+ template: 'new icon
'
},
id: 1
},
@@ -71,4 +73,52 @@ angular.module('angular-here-maps-development')
}
}
};
- });
\ No newline at end of file
+
+ $scope.moveCenter = function(){
+ $scope.map.center = {
+ lng: $scope.map.center.lng + (Math.random() / 100),
+ lat: $scope.map.center.lat + (Math.random() / 100)
+ };
+ };
+
+ $scope.mapOnLoad = function(platform, map){
+ $scope.platform = platform;
+ $scope.mapObj = map;
+ };
+
+ /**
+ * Example Center Map on Tap
+ */
+ $scope.mapEventOnTap = function(event, platform, map){
+ console.log('mapEventOnTap event', event, platform, map);
+ var coord = map.screenToGeo(event.currentPointer.viewportX, event.currentPointer.viewportY);
+ $scope.$apply(function(){
+ $scope.map.center = coord;
+ });
+ };
+
+ $scope.mapEventOnDoubleTap = function(event, platform, map){
+ console.log('mapEventOnDoubleTap event', event, platform, map);
+ };
+
+ $scope.mapEventOnDragStart = function(event, platform, map){
+ console.log('mapEventOnDragStart event', event, platform, map);
+ };
+
+ $scope.mapEventOnDrag = function(event, platform, map){
+ console.log('mapEventOnDrag event', event, platform, map);
+ };
+
+ $scope.mapEventOnDragEnd = function(event, platform, map){
+ console.log('mapEventOnDragEnd event', event, platform, map);
+ };
+
+ $scope.plusZoom = function(){
+ $scope.map.zoom++;
+ };
+
+ $scope.minusZoom = function(){
+ $scope.map.zoom--;
+ };
+
+ });
diff --git a/app/development/templates/icon.html b/app/development/templates/icon.html
index 2e4b601..1b7d807 100644
--- a/app/development/templates/icon.html
+++ b/app/development/templates/icon.html
@@ -1 +1 @@
-this is the icon {{id}} {{number}}
\ No newline at end of file
+this is the icon {{id}} {{number}}
diff --git a/app/index.html b/app/index.html
index 93fe71a..e0e2f78 100644
--- a/app/index.html
+++ b/app/index.html
@@ -15,12 +15,16 @@
@@ -28,11 +32,32 @@
-
-