[Portugal] openlayers instalado
Marco Afonso
mafonso333 gmail.com
Quarta-Feira, 30 de Novembro de 2011 - 09:25:48 EST
Viva,
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 *examples/example.html*
Por outro lado, pode incluir a versão online. Esta já carrega o tema por
defeito como indicado em:
http://docs.openlayers.org/library/introduction.html
Cumprimentos,
Marco
No dia 30 de Novembro de 2011 13:34, Pedro Costa
<pedrocostaarma sapo.pt>escreveu:
> Mesmo assim não consigo visualizar nada.
> O ficheiro html que escrevi é assim:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" <http://www.w3.org/1999/xhtml>>
> <head>
> <title>O meu primeiro mapa</title>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
> />
> <script src="/openlayers/lib/OpenLayers.js"
> type="text/javascript"></script>
> <script type="text/javascript">
> var map;
>
> function init() {
>
> map = new OpenLayers.Map({
> div: "map",
> allOverlays: true
> });
>
> var osm = new OpenLayers.Layer.OSM();
> var gmap = new OpenLayers.Layer.Google("Google Streets", {visibility:
> false});
>
> // note that first layer must be visible
> map.addLayers([osm, gmap]);
>
> map.addControl(new OpenLayers.Control.LayerSwitcher());
> map.zoomToMaxExtent();
>
> }
> </script>
> </head>
> <body onload='init();'>
> <h1>Mapa mundo</h1>
> <div id='map' style='width: 500px; height: 500px;'>
> </div>
> </body>
> </html>
>
>
>
> COnsegue detectar algum erro?
>
> Obrigado
>
>
>
>
>
>
>
> On 30-11-2011 09:57, Giovanni Manghi wrote:
>
> 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...
>
> http://openlayers.org/dev/examples/
>
> escolhe um exemplo e depois da uma vista de olhos ao codigo da pagina...
>
>
>
>
>
>
> _______________________________________________
> Portugal mailing listPortugal lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/portugal
>
>
>
> _______________________________________________
> Portugal mailing list
> Portugal lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/portugal
>
>
-------------- próxima parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.osgeo.org/pipermail/portugal/attachments/20111130/b5db9fa2/attachment.html
Mais informações acerca da lista Portugal