Index: trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js |
— | — | @@ -70,7 +70,9 @@ |
71 | 71 | |
72 | 72 | // Variables to prevent double adding of a base layer |
73 | 73 | var usedNor = false; var usedSat = false; var usedHyb = false; var usedPhy = false; // Google types |
74 | | - var usedBing = false; var usedYahoo = false; var usedOLWMS = false; var usedNasa = false; var usedOSM = false; |
| 74 | + var usedBingNor = false; var usedBingHyb = false; var usedBingSat = false; // Bing types |
| 75 | + var usedYahooNor = false; var usedYahooHyb = false; var usedYahooSat = false; // Yahoo types |
| 76 | + var usedOLWMS = false; var usedNasa = false; var usedOSM = false; |
75 | 77 | var isDefaultBaseLayer = false; |
76 | 78 | |
77 | 79 | // Add the base layers |
— | — | @@ -113,11 +115,30 @@ |
114 | 116 | } |
115 | 117 | break; |
116 | 118 | case 'bing' : case 'virtual-earth' : |
117 | | - if (!usedBing){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Virtual Earth' /* , {sphericalMercator:true} */); usedBing = true; } |
| 119 | + if (!usedBingNor){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Maps' , {type: VEMapStyle.Shaded} ); usedBingNor = true; } |
| 120 | + if (!usedBingSat){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Satellite' , {type: VEMapStyle.Aerial} ); usedBingSat = true; } |
| 121 | + if (!usedBingHyb){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Hybrid' , {type: VEMapStyle.Hybrid} ); usedBingHyb = true; } |
118 | 122 | break; |
119 | | - case 'yahoo' : case 'yahoo-maps' : |
120 | | - if (!usedYahoo){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps' /*, {sphericalMercator:true} */); usedYahoo = true; } |
| 123 | + case 'bing-normal' : |
| 124 | + if (!usedBingNor){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Maps' , {type: VEMapStyle.Shaded} ); usedBingNor = true; } |
| 125 | + case 'bing-satellite' : |
| 126 | + if (!usedBingSat){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Satellite' , {type: VEMapStyle.Aerial} ); usedBingSat = true; } |
| 127 | + case 'bing-hybrid' : |
| 128 | + if (!usedBingHyb){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Hybrid' , {type: VEMapStyle.Hybrid} ); usedBingHyb = true; } |
| 129 | + case 'yahoo' : |
| 130 | + if (!usedYahooNor){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps' ); usedYahooNor = true; } |
| 131 | + if (!usedYahooSat){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps', {'type': YAHOO_MAP_SAT} ); usedYahooSat = true; } |
| 132 | + if (!usedYahooHyb){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps', {'type': YAHOO_MAP_HYB} ); usedYahooHyb = true; } |
121 | 133 | break; |
| 134 | + case 'yahoo-normal' : |
| 135 | + if (!usedYahooNor){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps' ); usedYahooNor = true; } |
| 136 | + break; |
| 137 | + case 'yahoo-satellite' : |
| 138 | + if (!usedYahooSat){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps', {'type': YAHOO_MAP_SAT} ); usedYahooSat = true; } |
| 139 | + break; |
| 140 | + case 'yahoo-hybrid' : |
| 141 | + if (!usedYahooHyb){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo Maps', {'type': YAHOO_MAP_HYB} ); usedYahooHyb = true; } |
| 142 | + break; |
122 | 143 | case 'openlayers' : case 'open-layers' : |
123 | 144 | if (!usedOLWMS){ newLayer = new OpenLayers.Layer.WMS( 'OpenLayers WMS', 'http://labs.metacarta.com/wms/vmap0', {layers: 'basic'} ); usedOLWMS = true; } |
124 | 145 | break; |
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $lat = $markerData['lat']; |
69 | 69 | $lon = $markerData['lon']; |
70 | 70 | $title = array_key_exists('title', $markerData) ? $markerData['title'] : $this->title; |
71 | | - $label = array_key_exists('label', $markerData) ? $markerData['label'] : $this->label; |
| 71 | + $label = array_key_exists('label', $markerData) ? $markerData['label'] : $this->label; |
72 | 72 | $markerItems[] = "getOLMarkerData($lon, $lat, '$title', '$label')"; |
73 | 73 | } |
74 | 74 | |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -69,7 +69,8 @@ |
70 | 70 | $lon = $markerData['lon']; |
71 | 71 | $title = array_key_exists('title', $markerData) ? $markerData['title'] : $this->title; |
72 | 72 | $label = array_key_exists('label', $markerData) ? $markerData['label'] : $this->label; |
73 | | - $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '')"; |
| 73 | + $icon = array_key_exists('icon', $markerData) ? $markerData['icon'] : ''; |
| 74 | + $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
74 | 75 | } |
75 | 76 | |
76 | 77 | $markersString = implode(',', $markerItems); |
Index: trunk/extensions/Maps/Maps_BaseMap.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | | - * Sets the $marler_lon and $marler_lat fields. |
| 72 | + * Fills the $markerData array with the locations and their meta data. |
73 | 73 | * |
74 | 74 | */ |
75 | 75 | private function setCoordinates() { |
— | — | @@ -87,6 +87,10 @@ |
88 | 88 | |
89 | 89 | if (count($args) > 2) { |
90 | 90 | $markerData['label'] = $args[2]; |
| 91 | + |
| 92 | + if (count($args) > 3) { |
| 93 | + $markerData['icon'] = $args[3]; |
| 94 | + } |
91 | 95 | } |
92 | 96 | } |
93 | 97 | |