File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 9
9
// Step 1:
10
10
// Initialize the map with basic information
11
11
var interactive_map = new InteractiveMap ( 'map' , {
12
+ // This will limit automatic zooming to this zoom level
12
13
max_good_zoom : 6 ,
14
+ // This is the max zoom the map will allow
13
15
max_map_zoom : 8 ,
14
16
website_source : 'https://github.com/interactive-game-maps/template' ,
15
17
website_subdir : 'template' ,
Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ function addInformation(map) {
82
82
fillColor : 'red' ,
83
83
fillOpacity : 0.2
84
84
} ;
85
+ } ,
86
+
87
+ // If the coordinates are extracted from the game files they might need a transformation to
88
+ // map correctly
89
+ coordsToLatLng : function ( coords ) {
90
+ var lx = ( coords [ 0 ] + 1 ) * 0.5 ;
91
+ var ly = ( coords [ 1 ] - 1 ) * 0.5 ;
92
+ return L . latLng ( ly , lx ) ;
85
93
}
86
94
87
95
// Some additional notes:
You can’t perform that action at this time.
0 commit comments