From 462cbde2b8017f093c36745a940cf1fbbb4cadfc Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 9 Feb 2010 02:24:49 +0000 Subject: [PATCH] Criação de mashup com openlayers --- mashups/index.html | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mashups/openlayers.css | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mashups/openlayers.php | 384 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mashups/openlayers.png | Bin 0 -> 7696 bytes principal.htm | 8 ++++++++ 5 files changed, 516 insertions(+), 0 deletions(-) create mode 100644 mashups/index.html create mode 100644 mashups/openlayers.css create mode 100644 mashups/openlayers.php create mode 100644 mashups/openlayers.png diff --git a/mashups/index.html b/mashups/index.html new file mode 100644 index 0000000..bfa0650 --- /dev/null +++ b/mashups/index.html @@ -0,0 +1,67 @@ + + + +i3Geo + + + +
+

Mashups do i3geo

+ +

Mashups são pequenos programas que podem ser facilmente inseridos em páginas HTML e que mostram determinados conteúdos.

+

No caso do i3Geo, os mashups mostram mapas tendo como base o conjunto de temas existentes no diretório i3geo/temas.

+

OpenLayers

+

O OpenLayers é uma biblioteca em javascript bastante popular. Possuí uma interface simples mas que pode +conter um grande número de funcionalidades.

+

Endereço: i3geo/mashups/openlayers.php

+

Exemplo: i3geo/mashups/openlayers.php?temas=biomashp

+ + + \ No newline at end of file diff --git a/mashups/openlayers.css b/mashups/openlayers.css new file mode 100644 index 0000000..d4505fb --- /dev/null +++ b/mashups/openlayers.css @@ -0,0 +1,57 @@ +.olControlEditingToolbar .panItemInactive { +background-position:-0px 0; +} +.olControlEditingToolbar .panItemActive { +background-position:-0px -28px; +} +.olControlEditingToolbar .zoomboxItemInactive { +background-position:-29px 0; +} +.olControlEditingToolbar .zoomboxItemActive { +background-position:-29px -28px; +} +.olControlEditingToolbar .zoomtotItemInactive { +background-position:-58px 0; +} +.olControlEditingToolbar .zoomtotItemActive { +background-position:-58px -28px; +} +.olControlEditingToolbar .legendaItemInactive { +background-position:-87px 0; +} +.olControlEditingToolbar .legendaItemActive { +background-position:-87px -28px; +} +.olControlEditingToolbar .distanciaItemInactive { +background-position:-116px 0; +} +.olControlEditingToolbar .distanciaItemActive { +background-position:-116px -28px; +} +.olControlEditingToolbar .areaItemInactive { +background-position:-145px 0; +} +.olControlEditingToolbar .areaItemActive { +background-position:-145px -28px; +} +.olControlEditingToolbar .identificaItemInactive { +background-position:-174px 0; +} +.olControlEditingToolbar .identificaItemActive { +background-position:-174px -28px; +} +.olControlEditingToolbar { + width:300px; +} +.olControlEditingToolbar div { + background-image:url(openlayers.png); + background-repeat:no-repeat; + float:right; + height:29px; + margin:2px; + width:29px; +} +pre{ + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; +} \ No newline at end of file diff --git a/mashups/openlayers.php b/mashups/openlayers.php new file mode 100644 index 0000000..4ca5d1e --- /dev/null +++ b/mashups/openlayers.php @@ -0,0 +1,384 @@ +numlayers);++$i) + { + $layern = $maptemp->getLayer($i); + $layers[] = $layern->name; + } + $objOpenLayers[] = 'new OpenLayers.Layer.WMS( "'.($layern->getmetadata("tema")).'", "../ogc.php?tema='.$tema.'&",{layers:"'.implode(",",$layers).'",transparent: "true", format: "image/png"},{isBaseLayer:false})'; + } + else + {echo $tema." não foi encontrado.
";} + $layers = array(); + } +} +function ajuda(){ + echo " +

+Mashup OpenLayers
+Parâmetros:
+	servidor - endereco do servidor OGC utilizado. Por default é ../ogc.php o que força o uso do i3geo local
+	temas - lista com os temas (mapfiles) do i3Geo que serão incluídos no mapa
+	numzoomlevels - número de níveis de zoom, default=6
+	maxextent - extensão geográfica do mapa (xmin,ymin,xmax,ymax)
+	controles - lista com os nomes dos controles que serão adicionados ao mapa. Se não for definido, todos os controles serão adicionados
+		navigation
+		panzoombar 
+		layerswitcher 
+		scaleline 
+		mouseposition
+		overviewmap 
+		keyboarddefaults
+	botoes - lista com os nomes dos botoes que serão adicionados ao mapa. Se não for definido, todos os botões serão adicionados
+		pan
+		zoombox
+		zoomtot
+		distancia
+		area
+		identifica
+	";	
+	exit;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/mashups/openlayers.png b/mashups/openlayers.png new file mode 100644 index 0000000..91a6761 Binary files /dev/null and b/mashups/openlayers.png differ diff --git a/principal.htm b/principal.htm index d58d5aa..a753b11 100644 --- a/principal.htm +++ b/principal.htm @@ -125,6 +125,14 @@ Aplicativos disponíveis com o i3geo e documentação. + + Mashups + + + + + + Inicialização normal do i3geo -- libgit2 0.21.2