@@ -50,14 +50,26 @@ function getNormalizedCoord(coord, zoom) {
5050 } ;
5151}
5252
53+ var streetOverlayImages = new google . maps . ImageMapType ( {
54+ getTileUrl : function ( coord , zoom ) {
55+ var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
56+ if ( ! normalizedCoord ) {
57+ return null ;
58+ }
59+ return _MAP_tileURL + 'overlay_streets/' + zoom + '-' + coord . x + '_' + coord . y + '.png' ;
60+ } ,
61+ tileSize : new google . maps . Size ( 256 , 256 ) ,
62+ name : "Street names"
63+ } ) ;
64+
5365// Start atlas
5466var mapAtlasOptions = {
5567 getTileUrl : function ( coord , zoom ) {
5668 var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
5769 if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
5870 return null ;
5971 }
60- return _MAP_tileURL + 'atlas/' + zoom + '_ ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
72+ return _MAP_tileURL + 'atlas/' + zoom + '- ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
6173 } ,
6274 tileSize : new google . maps . Size ( 256 , 256 ) ,
6375 maxZoom : 7 ,
@@ -75,7 +87,7 @@ var mapSatelliteOptions = {
7587 if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
7688 return null ;
7789 }
78- return _MAP_tileURL + 'satellite/' + zoom + '_ ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
90+ return _MAP_tileURL + 'satellite/' + zoom + '- ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
7991 } ,
8092 tileSize : new google . maps . Size ( 256 , 256 ) ,
8193 maxZoom : 7 ,
@@ -93,11 +105,11 @@ var mapRoadOptions = {
93105 if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
94106 return null ;
95107 }
96- return _MAP_tileURL + 'road/' + zoom + '_ ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
108+ return _MAP_tileURL + 'road/' + zoom + '- ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
97109 } ,
98110 tileSize : new google . maps . Size ( 256 , 256 ) ,
99111 maxZoom : 7 ,
100- minZoom : 5 ,
112+ // minZoom: 5,
101113 name : "Road" ,
102114 alt : "GTA V Road Map"
103115} ;
@@ -112,7 +124,7 @@ var mapUVInvOptions = {
112124 if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
113125 return null ;
114126 }
115- return _MAP_tileURL + 'uv-invert/' + zoom + '_ ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
127+ return _MAP_tileURL + 'uv-invert/' + zoom + '- ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
116128 } ,
117129 tileSize : new google . maps . Size ( 256 , 256 ) ,
118130 maxZoom : 7 ,
@@ -130,7 +142,7 @@ var mapPostcodeOptions = {
130142 if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
131143 return null ;
132144 }
133- return _MAP_tileURL + 'postcode/' + zoom + '_ ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
145+ return _MAP_tileURL + 'postcode/' + zoom + '- ' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
134146 } ,
135147 tileSize : new google . maps . Size ( 256 , 256 ) ,
136148 maxZoom : 7 ,
@@ -169,6 +181,12 @@ function mapInit(elementID) {
169181 _MAP_roadMap ? map . mapTypes . set ( "Road" , mapRoad ) : null ;
170182 _MAP_UVInvMap ? map . mapTypes . set ( "UV Invert" , mapUVInv ) : null ;
171183 _MAP_PostcodeMap ? map . mapTypes . set ( "Postcode" , mapPostcode ) : null ;
184+
185+ //TODO: Maybe make this an option or something?
186+ _overlays . push ( streetOverlayImages ) ;
187+
188+ //TODO: If a postcode overlay get made or something, add it here too..
189+
172190 map . setMapTypeId ( "Atlas" ) ;
173191 google . maps . event . addListener ( map , "maptypeid_changed" , function ( ) {
174192 var type = map . getMapTypeId ( ) ;
0 commit comments