Viva,<div><br></div><div>O caminho que indicou nas tags script para o OpenLayers é local. Para trabalhar com o pacote local terá que incluir o tema do OpenLayers, tal como indicado no exemplo em <i>examples/example.html</i></div>
<div><br></div><div>Por outro lado, pode incluir a versão online. Esta já carrega o tema por defeito como indicado em:</div><div><a href="http://docs.openlayers.org/library/introduction.html">http://docs.openlayers.org/library/introduction.html</a></div>
<div><br></div><div>Cumprimentos,</div><div>Marco<br><br><div class="gmail_quote">No dia 30 de Novembro de 2011 13:34, Pedro Costa <span dir="ltr"><<a href="mailto:pedrocostaarma@sapo.pt">pedrocostaarma@sapo.pt</a>></span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000">
Mesmo assim não consigo visualizar nada.<br>
O ficheiro html que escrevi é assim:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd"><br>
<html xmlns=<a href="http://www.w3.org/1999/xhtml" target="_blank">"http://www.w3.org/1999/xhtml"</a>><br>
<head><br>
<title>O meu primeiro mapa</title><br>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" /><br>
<script src="/openlayers/lib/OpenLayers.js"
type="text/javascript"></script><br>
<script type="text/javascript"><br>
var map;<br>
<br>
function init() {<br>
<br>
map = new OpenLayers.Map({<br>
div: "map",<br>
allOverlays: true<br>
});<br>
<br>
var osm = new OpenLayers.Layer.OSM();<br>
var gmap = new OpenLayers.Layer.Google("Google Streets",
{visibility: false});<br>
<br>
// note that first layer must be visible<br>
map.addLayers([osm, gmap]);<br>
<br>
map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
map.zoomToMaxExtent();<br>
<br>
}<br>
</script><br>
</head><br>
<body onload='init();'><br>
<h1>Mapa mundo</h1><br>
<div id='map' style='width: 500px; height: 500px;'><br>
</div><br>
</body><br>
</html><br>
<br>
<br>
<br>
COnsegue detectar algum erro?<br>
<br>
Obrigado<div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
On 30-11-2011 09:57, Giovanni Manghi wrote:
</div></div><blockquote type="cite"><div><div class="h5">
<pre></pre>
<blockquote type="cite">
<pre>Podem dizer-me como posso ter a certeza se o openlayers está instalado?O
meu OS é a Geobox e estou a tentar criar um html com um mapa para
aprender, mas o mapa nunca chega a aparecer.
Não tenho nenhuma pasta chamada 'openlayers' em home...
</pre>
</blockquote>
<pre><a href="http://openlayers.org/dev/examples/" target="_blank">http://openlayers.org/dev/examples/</a>
escolhe um exemplo e depois da uma vista de olhos ao codigo da pagina...
</pre>
<br>
<fieldset></fieldset>
<br>
</div></div><div class="im"><pre>_______________________________________________
Portugal mailing list
<a href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
</div></blockquote>
<br>
</div>
<br>_______________________________________________<br>
Portugal mailing list<br>
<a href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
<br></blockquote></div><br></div>