@@ -50,7 +50,7 @@ function getNormalizedCoord(coord, zoom) {
50
50
} ;
51
51
}
52
52
53
-
53
+ // Start atlas
54
54
var mapAtlasOptions = {
55
55
getTileUrl : function ( coord , zoom ) {
56
56
var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -66,6 +66,9 @@ var mapAtlasOptions = {
66
66
} ;
67
67
var mapAtlas = new google . maps . ImageMapType ( mapAtlasOptions ) ;
68
68
mapAtlas . projection = new EuclideanProjection ( ) ;
69
+ //End atlas
70
+
71
+ //Start satellite
69
72
var mapSatelliteOptions = {
70
73
getTileUrl : function ( coord , zoom ) {
71
74
var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -81,6 +84,9 @@ var mapSatelliteOptions = {
81
84
} ;
82
85
var mapSatellite = new google . maps . ImageMapType ( mapSatelliteOptions ) ;
83
86
mapSatellite . projection = new EuclideanProjection ( ) ;
87
+ //end satellite
88
+
89
+ //start road
84
90
var mapRoadOptions = {
85
91
getTileUrl : function ( coord , zoom ) {
86
92
var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -96,6 +102,9 @@ var mapRoadOptions = {
96
102
} ;
97
103
var mapRoad = new google . maps . ImageMapType ( mapRoadOptions ) ;
98
104
mapRoad . projection = new EuclideanProjection ( ) ;
105
+ //end road
106
+
107
+ //start UV
99
108
var mapUVInvOptions = {
100
109
getTileUrl : function ( coord , zoom ) {
101
110
var normalizedCoord = getNormalizedCoord ( coord , zoom ) ;
@@ -111,6 +120,25 @@ var mapUVInvOptions = {
111
120
} ;
112
121
var mapUVInv = new google . maps . ImageMapType ( mapUVInvOptions ) ;
113
122
mapUVInv . 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
114
142
115
143
function mapInit ( elementID ) {
116
144
_MAP_markerStore = [ ] ;
@@ -120,6 +148,7 @@ function mapInit(elementID) {
120
148
_MAP_satelliteMap ? mapID . push ( "Satellite" ) : null ;
121
149
_MAP_roadMap ? mapID . push ( "Road" ) : null ;
122
150
_MAP_UVInvMap ? mapID . push ( "UV Invert" ) : null ;
151
+ _MAP_PostcodeMap ? mapID . push ( "Postcode" ) : null ;
123
152
var mapOptions = {
124
153
backgroundColor : "#0fa8d2" ,
125
154
minZoom : 3 ,
@@ -138,6 +167,7 @@ function mapInit(elementID) {
138
167
_MAP_satelliteMap ? map . mapTypes . set ( "Satellite" , mapSatellite ) : null ;
139
168
_MAP_roadMap ? map . mapTypes . set ( "Road" , mapRoad ) : null ;
140
169
_MAP_UVInvMap ? map . mapTypes . set ( "UV Invert" , mapUVInv ) : null ;
170
+ _MAP_PostcodeMap ? map . mapTypes . set ( "Postcode" , mapPostcode ) : null ;
141
171
map . setMapTypeId ( "Atlas" ) ;
142
172
google . maps . event . addListener ( map , "maptypeid_changed" , function ( ) {
143
173
var type = map . getMapTypeId ( ) ;
@@ -162,6 +192,11 @@ function mapInit(elementID) {
162
192
"background-color" : "#f2f0b6"
163
193
} ) ;
164
194
break
195
+ default :
196
+ $ ( "#" + elementID ) . css ( {
197
+ "background-color" : "#0fa8d2"
198
+ } ) ;
199
+ break ;
165
200
}
166
201
} ) ;
167
202
}
0 commit comments