File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import '../images/marker.png' ;
2+
3+ const MapService = ( ) => {
4+ const service = {
5+ getMapIcon,
6+ getMapInstance,
7+ } ;
8+
9+ return service ;
10+
11+ //
12+
13+ function getMapIcon ( options ) {
14+ return angular . extend ( {
15+ iconUrl : 'assets/images/marker.png' ,
16+ shadowUrl : undefined ,
17+ iconSize : [ 40 , 40 ] ,
18+ shadowSize : [ 0 , 0 ] ,
19+ iconAnchor : [ 20 , 20 ] ,
20+ shadowAnchor : [ 0 , 0 ] ,
21+ } , options ) ;
22+ }
23+
24+ function getMapInstance ( options ) {
25+ return angular . extend ( {
26+ center : {
27+ lat : 51.686 ,
28+ lng : 19.545 ,
29+ zoom : 7 ,
30+ } ,
31+ markers : { } ,
32+ layers : {
33+ baselayers : {
34+ osm : {
35+ name : 'OpenStreetMap' ,
36+ type : 'xyz' ,
37+ url : '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,
38+ layerOptions : {
39+ subdomains : [ 'a' , 'b' , 'c' ] ,
40+ attribution : '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ,
41+ continuousWorld : true ,
42+ } ,
43+ } ,
44+ } ,
45+ overlays : {
46+ monuments : {
47+ name : 'Monuments' ,
48+ type : 'markercluster' ,
49+ visible : true ,
50+ } ,
51+ } ,
52+ } ,
53+ } , options ) ;
54+ }
55+ } ;
56+
57+ export default ( ) => {
58+ angular
59+ . module ( 'monumental' )
60+ . factory ( 'mapService' , MapService ) ;
61+ } ;
You can’t perform that action at this time.
0 commit comments