It is difficult to reproduce the bug you describe without gaining access to your tile provider URL and seeing what tile source you are using.
I have appended a test example below which combines two overlays and it seems to work fine.
It just seems to be a matter of altering the opacity values because the transparency can either be in the tile source or in the overlay.
- The open street map is an opaque tile source with a translucent overlay
- The old berlin tile source is translucent and the overlay is opaque.
The only issue I've had is with cached images within the browser. Is it possible that your html or images need a cache-control directive?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Example from Nokia Maps API Playground, for more information visit http://api.maps.nokia.com
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
<title>Multiple Overlays</title>
<script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.3/jsl.js?with=all"></script>
<style type="text/css">
html {
overflow:hidden;
}
body {
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
height: 100%;
position: absolute;
}
#mapContainer {
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
}
</style>
</head>
<body>
<div id="mapContainer"></div>
<div id="uiContainer"></div>
<script type="text/javascript" id="exampleJsSource">
/////////////////////////////////////////////////////////////////////////////////////
// Don't forget to set your API credentials
//
// Replace with your appId and token which you can obtain when you
// register on http://api.developer.nokia.com/
//
nokia.Settings.set( "appId", "YOUR APP ID GOES HERE");
nokia.Settings.set( "authenticationToken", "YOUR AUTHENTICATION TOKEN GOES HERE");
//
/////////////////////////////////////////////////////////////////////////////////////
var mapContainer = document.getElementById("mapContainer");
var map = new nokia.maps.map.Display(mapContainer, {
// initial center and zoom level of the map
center: [52.515, 13.405],
zoomLevel: 14,
components: [
// ZoomBar provides a UI to zoom the map in & out
new nokia.maps.map.component.ZoomBar(),
// We add the behavior component to allow panning / zooming of the map
new nokia.maps.map.component.Behavior()
]
});
var getTileUrlBerlin = function (zoom, row, column) {
return "http://api.maps.nokia.com/en/playground/examples/maps/res/old_berlin_overlay_tiles/"+ zoom+ "/"+ row + "/"+ column+ ".png";
},
tileProviderOptionsBerlin = {
getUrl: getTileUrlBerlin, // Obligatory function
max:15, // The highest zoom level for the overlay.
min:12, // The lowest zoom level for the overlay.
opacity: 1, // Overlay opacity.0 is fully transparent, 1 is fully opaque.
alpha:true // This value tells the renderer to read the alpha channel; required if opacity is used.
},
// Create an overlay by calling the constructor for ImgTileProvider
oldBerlinOverlay = new nokia.maps.map.provider.ImgTileProvider(tileProviderOptionsBerlin);
// Add the overlay to the map
map.overlays.add(oldBerlinOverlay);
var getTileUrlCycle = function (zoom, row, column) {
return "http://a.tile.opencyclemap.org/cycle/"+ zoom+ "/"+ column + "/"+ row+ ".png";
},
tileProviderOptionsCycle = {
getUrl: getTileUrlCycle, // Obligatory function
max:15, // The highest zoom level for the overlay.
min:12, // The lowest zoom level for the overlay.
opacity: 0.5, // Overlay opacity.0 is fully transparent, 1 is fully opaque.
alpha:true // This value tells the renderer to read the alpha channel; required if opacity is used.
},
// Create an overlay by calling the constructor for ImgTileProvider
openCycleMapOverlay = new nokia.maps.map.provider.ImgTileProvider(tileProviderOptionsCycle);
// Add the overlay to the map
map.overlays.add(openCycleMapOverlay);
map.overlays.add(oldBerlinOverlay);
</script>
</body>
</html>
Note the Old Berlin source has doesn't cover the globe and since I've removed the error checking code from the getTileUrlBerlin function regularly requests 404s.