@@ -50,7 +50,7 @@ function getNormalizedCoord(coord, zoom) {
5050 } ;
5151}
5252
53-
53+ // Start atlas
5454var mapAtlasOptions = {
5555 getTileUrl : function ( coord , zoom ) {
5656 var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -66,6 +66,9 @@ var mapAtlasOptions = {
6666} ;
6767var mapAtlas = new google . maps . ImageMapType ( mapAtlasOptions ) ;
6868mapAtlas . projection = new EuclideanProjection ( ) ;
69+ //End atlas
70+
71+ //Start satellite
6972var mapSatelliteOptions = {
7073 getTileUrl : function ( coord , zoom ) {
7174 var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -81,6 +84,9 @@ var mapSatelliteOptions = {
8184} ;
8285var mapSatellite = new google . maps . ImageMapType ( mapSatelliteOptions ) ;
8386mapSatellite . projection = new EuclideanProjection ( ) ;
87+ //end satellite
88+
89+ //start road
8490var mapRoadOptions = {
8591 getTileUrl : function ( coord , zoom ) {
8692 var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -96,6 +102,9 @@ var mapRoadOptions = {
96102} ;
97103var mapRoad = new google . maps . ImageMapType ( mapRoadOptions ) ;
98104mapRoad . projection = new EuclideanProjection ( ) ;
105+ //end road
106+
107+ //start UV
99108var mapUVInvOptions = {
100109 getTileUrl : function ( coord , zoom ) {
101110 var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -111,6 +120,25 @@ var mapUVInvOptions = {
111120} ;
112121var mapUVInv = new google . maps . ImageMapType ( mapUVInvOptions ) ;
113122mapUVInv . projection = new EuclideanProjection ( ) ;
123+ //end uv
124+
125+ // Postcode map
126+ var mapPostcodeOptions = {
127+ getTileUrl : function ( coord , zoom ) {
128+ var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
129+ if ( ! normalizedCoord || normalizedCoord . x > bounds [ zoom ] || normalizedCoord . y > bounds [ zoom ] ) {
130+ return null ;
131+ }
132+ return _MAP_tileURL + 'postcode/' + zoom + '_' + normalizedCoord . x + '_' + normalizedCoord . y + '.png' ;
133+ } ,
134+ tileSize : new google . maps . Size ( 256 , 256 ) ,
135+ maxZoom : 7 ,
136+ name : "Postcode" ,
137+ alt : "GTA V Postcode Map"
138+ } ;
139+ var mapPostcode = new google . maps . ImageMapType ( mapPostcodeOptions ) ;
140+ mapPostcode . projection = new EuclideanProjection ( ) ;
141+ //end postcode
114142
115143function mapInit ( elementID ) {
116144 _MAP_markerStore = [ ] ;
@@ -120,6 +148,7 @@ function mapInit(elementID) {
120148 _MAP_satelliteMap ? mapID . push ( "Satellite" ) : null ;
121149 _MAP_roadMap ? mapID . push ( "Road" ) : null ;
122150 _MAP_UVInvMap ? mapID . push ( "UV Invert" ) : null ;
151+ _MAP_PostcodeMap ? mapID . push ( "Postcode" ) : null ;
123152 var mapOptions = {
124153 backgroundColor : "#0fa8d2" ,
125154 minZoom : 3 ,
@@ -138,6 +167,7 @@ function mapInit(elementID) {
138167 _MAP_satelliteMap ? map . mapTypes . set ( "Satellite" , mapSatellite ) : null ;
139168 _MAP_roadMap ? map . mapTypes . set ( "Road" , mapRoad ) : null ;
140169 _MAP_UVInvMap ? map . mapTypes . set ( "UV Invert" , mapUVInv ) : null ;
170+ _MAP_PostcodeMap ? map . mapTypes . set ( "Postcode" , mapPostcode ) : null ;
141171 map . setMapTypeId ( "Atlas" ) ;
142172 google . maps . event . addListener ( map , "maptypeid_changed" , function ( ) {
143173 var type = map . getMapTypeId ( ) ;
@@ -162,6 +192,11 @@ function mapInit(elementID) {
162192 "background-color" : "#f2f0b6"
163193 } ) ;
164194 break
195+ default :
196+ $ ( "#" + elementID ) . css ( {
197+ "background-color" : "#0fa8d2"
198+ } ) ;
199+ break ;
165200 }
166201 } ) ;
167202}
0 commit comments