I have created a map in MBTiles using TileMill and hosted it on MapBox. Now I am trying to display it on my website adding the infobox using OpenLayers and Wax
Acording with these
http://www.mapbox.com/wax/connector-ol.html
geoconsulter. de/map/wax/manual/index.html
This code should be working, but it does not. The tiles appear fine, but not the legend. If I do not comment this line //map.addControl(new wax.ol.Interaction()); there is an error about the method being undefined. But if I leave like that, there is no error but still the legend does not appear
wax.tilejson('http://api.tiles.mapbox.com/v3/carmencampos.example.jsonp',
function(tilejson) {
var map = new OpenLayers.Map({
div: 'map',
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.Attribution(),
new wax.ol.Legend()
],
layers: [
wax.ol.connector(tilejson)
]
});
map.addControl(new wax.ol.Legend());
//map.addControl(new wax.ol.Interaction());
map.zoomTo(3);
});
I would appreciate any comments.
Thanks in advance, Carmen