Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,879 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.ngeo-routing-error { | ||
color: darkred; | ||
} | ||
|
||
.ngeo-routing-start .fa-map-marker { | ||
color: #6BE62E; | ||
text-shadow: -1px 0 #4CB01E, 0 1px #4CB01E, 1px 0 #4CB01E, 0 -1px #4CB01E; | ||
} | ||
|
||
.ngeo-routing-destination .fa-map-marker { | ||
color: #FF3E13; | ||
text-shadow: -1px 0 #CD3412, 0 1px #CD3412, 1px 0 #CD3412, 0 -1px #CD3412; | ||
} | ||
|
||
.ngeo-routing-vias .fa-map-marker { | ||
color: #767676; | ||
text-shadow: -1px 0 #000000, 0 1px #000000, 1px 0 #000000, 0 -1px #000000; | ||
} | ||
|
||
.ngeo-nominatim-input { | ||
height: 30px; | ||
} | ||
|
||
/** | ||
* Typeahead | ||
*/ | ||
.tt-menu { | ||
background-color: #fff; | ||
border: 1px solid #ccc; | ||
} | ||
|
||
.tt-suggestion.tt-is-under-cursor, .tt-suggestion:hover { | ||
color: #fff; | ||
background-color: #0097cf; | ||
} | ||
|
||
.tt-suggestion p { | ||
margin: 0; | ||
} | ||
|
||
.ngeo-nominatim-input .twitter-typeahead { | ||
width: 100%; | ||
background: #fff; | ||
} | ||
|
||
.ngeo-routing-vias .form-inline .input-group .form-control { | ||
width: 185px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<!DOCTYPE html> | ||
<html ng-app='app'> | ||
<head> | ||
<title>Routing example</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> | ||
<meta name="mobile-web-app-capable" content="yes"> | ||
<link rel="stylesheet" href="../node_modules/openlayers/css/ol.css" type="text/css"> | ||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" type="text/css"> | ||
<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css" type="text/css"> | ||
<style> | ||
#map { | ||
width: 600px; | ||
height: 400px; | ||
} | ||
@media (max-width: 768px) { | ||
#map { | ||
height: 200px; | ||
width: 200px; | ||
} | ||
} | ||
.ngeo-routing-error { | ||
color: darkred; | ||
} | ||
|
||
.ngeo-routing-start .fa-map-marker { | ||
color: #6BE62E; | ||
text-shadow: -1px 0 #4CB01E, 0 1px #4CB01E, 1px 0 #4CB01E, 0 -1px #4CB01E; | ||
} | ||
|
||
.ngeo-routing-destination .fa-map-marker { | ||
color: #FF3E13; | ||
text-shadow: -1px 0 #CD3412, 0 1px #CD3412, 1px 0 #CD3412, 0 -1px #CD3412; | ||
} | ||
|
||
.ngeo-routing-vias .fa-map-marker { | ||
color: #767676; | ||
text-shadow: -1px 0 #000000, 0 1px #000000, 1px 0 #000000, 0 -1px #000000; | ||
} | ||
|
||
.ngeo-nominatim-input { | ||
height: 30px; | ||
} | ||
|
||
.tt-menu { | ||
background-color: #fff; | ||
border: 1px solid #ccc; | ||
} | ||
|
||
.tt-suggestion.tt-is-under-cursor, .tt-suggestion:hover { | ||
color: #fff; | ||
background-color: #0097cf; | ||
} | ||
|
||
.tt-suggestion p { | ||
margin: 0; | ||
} | ||
|
||
.ngeo-nominatim-input .twitter-typeahead { | ||
width: 100%; | ||
} | ||
|
||
.ngeo-routing-vias .form-inline .input-group .form-control { | ||
width: 185px; | ||
} | ||
</style> | ||
</head> | ||
<body ng-controller="MainController as mainCtrl"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-7"> | ||
<div id="map" ngeo-map="mainCtrl.map"></div> | ||
</div> | ||
<div class="col-md-5"> | ||
<ngeo-routing ngeo-routing-map="mainCtrl.map"> | ||
</ngeo-routing> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<p id="desc">This example shows how to use ngeo's routing component (<code><a href="../apidoc/ngeo.routingComponent.html" title="Read our documentation">ngeo-routingComponent</a></code>)..</p> | ||
<script src="../node_modules/jquery/dist/jquery.js"></script> | ||
<script src="../node_modules/angular/angular.js"></script> | ||
<script src="../node_modules/angular-gettext/dist/angular-gettext.js"></script> | ||
<script src="../node_modules/angular-ui-date/dist/date.js"></script> | ||
<script src="../node_modules/angular-float-thead/angular-floatThead.js"></script> | ||
<script src="../node_modules/floatthead/dist/jquery.floatThead.min.js"></script> | ||
<script src="../node_modules/proj4/dist/proj4.js"></script> | ||
<script src="../node_modules/corejs-typeahead/dist/typeahead.bundle.js"></script> | ||
<script src="/@?main=routing.js"></script> | ||
<script src="default.js"></script> | ||
<script src="../utils/watchwatchers.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* This example shows the ngeo routing directive. | ||
*/ | ||
|
||
goog.provide('app.routing'); | ||
|
||
goog.require('ol.Map'); | ||
goog.require('ol.View'); | ||
goog.require('ol.layer.Tile'); | ||
goog.require('ol.source.OSM'); | ||
|
||
/** @type {!angular.Module} */ | ||
app.module = angular.module('app', ['ngeo']); | ||
|
||
|
||
/** | ||
* The application's main directive. | ||
* @constructor | ||
* @ngInject | ||
*/ | ||
app.MainController = function() { | ||
|
||
/** | ||
* @type {ol.Map} | ||
* @export | ||
*/ | ||
this.map = new ol.Map({ | ||
layers: [ | ||
new ol.layer.Tile({ | ||
source: new ol.source.OSM() | ||
}) | ||
], | ||
view: new ol.View({ | ||
center: [931010.1535989442, 5961705.842297254], | ||
zoom: 9 | ||
}) | ||
}); | ||
|
||
/** | ||
* @type {boolean} | ||
* @export | ||
*/ | ||
this.routingfeatureActive = true; | ||
}; | ||
|
||
app.module.controller('MainController', app.MainController); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.