[Commits] r1574 - in sandbox/cmoullet/ux: . Bing Bing/examples
commits at geoext.org
commits at geoext.org
Thu Dec 10 23:10:03 CET 2009
Author: cmoullet
Date: 2009-12-10 23:10:03 +0100 (Thu, 10 Dec 2009)
New Revision: 1574
Added:
sandbox/cmoullet/ux/Bing/
sandbox/cmoullet/ux/Bing/examples/
sandbox/cmoullet/ux/Bing/examples/Bing.html
sandbox/cmoullet/ux/Bing/examples/BingExample.html
sandbox/cmoullet/ux/Bing/examples/BingExample.js
Log:
Workaround for bing
Added: sandbox/cmoullet/ux/Bing/examples/Bing.html
===================================================================
--- sandbox/cmoullet/ux/Bing/examples/Bing.html (rev 0)
+++ sandbox/cmoullet/ux/Bing/examples/Bing.html 2009-12-10 22:10:03 UTC (rev 1574)
@@ -0,0 +1,48 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>OpenLayers Bing Example</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us"></script>
+
+ <script src="../../../trunk/openlayers/lib/OpenLayers.js"></script>
+
+ <script>
+
+ var map;
+
+ function init(){
+ map = new OpenLayers.Map("map");
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+
+ var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {
+ type: VEMapStyle.Shaded
+ });
+ var hybrid = new OpenLayers.Layer.VirtualEarth("Hybrid", {
+ type: VEMapStyle.Hybrid
+ });
+ var aerial = new OpenLayers.Layer.VirtualEarth("Aerial", {
+ type: VEMapStyle.Aerial
+ });
+
+ map.addLayers([shaded, hybrid, aerial]);
+
+ map.setCenter(new OpenLayers.LonLat(-110, 45), 3);
+ }
+
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">Bing Example</h1>
+
+ <div id="tags"></div>
+
+ <p id="shortdesc">
+ Demonstrates the use of Bing layers.
+ </p>
+
+ <div id="map" class="smallmap"></div>
+ <div id="docs">This example demonstrates the ability to create layers using tiles from Bing maps.</div>
+ </body>
+</html>
+
+
Added: sandbox/cmoullet/ux/Bing/examples/BingExample.html
===================================================================
--- sandbox/cmoullet/ux/Bing/examples/BingExample.html (rev 0)
+++ sandbox/cmoullet/ux/Bing/examples/BingExample.html 2009-12-10 22:10:03 UTC (rev 1574)
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <title>Bing Example</title>
+ <script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
+ <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
+ <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
+ <script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
+ <script src="../../../trunk/openlayers/lib/OpenLayers.js"></script>
+ <script type="text/javascript" src="../../../trunk/geoext/lib/GeoExt.js"></script>
+ <script type="text/javascript" src="BingExample.js"></script>
+
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file
Added: sandbox/cmoullet/ux/Bing/examples/BingExample.js
===================================================================
--- sandbox/cmoullet/ux/Bing/examples/BingExample.js (rev 0)
+++ sandbox/cmoullet/ux/Bing/examples/BingExample.js 2009-12-10 22:10:03 UTC (rev 1574)
@@ -0,0 +1,68 @@
+var viewport;
+var treePanel;
+var map;
+
+Ext.onReady(function() {
+ map = new OpenLayers.Map();
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+
+ var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {
+ type: VEMapStyle.Shaded
+ });
+ var hybrid = new OpenLayers.Layer.VirtualEarth("Hybrid", {
+ type: VEMapStyle.Hybrid
+ });
+ var aerial = new OpenLayers.Layer.VirtualEarth("Aerial", {
+ type: VEMapStyle.Aerial
+ });
+
+ viewport = new Ext.Viewport({
+ layout: "border",
+ id: 'mainViewport',
+ items: [
+ {
+ region: "center",
+ id: "mappanel",
+ title: "Bing",
+ xtype: "gx_mappanel",
+ map: map,
+ split: true
+ },
+ {
+ region: "west",
+ id: "treepanel",
+ title: "Layer Tree",
+ width: 200
+ },
+ {
+ region: "south",
+ layout: 'fit',
+ id: "readme",
+ title: 'README',
+ margins: {left: 5,top: 5, bottom: 5, right: 5},
+ html: '<p style="font-size:12pt;color:#15428B;font-weight:bold;margin:5">Bing example</p>'
+ }
+ ]
+ });
+
+ var mapStore = new GeoExt.data.LayerStore({
+ map: map,
+ layers: [shaded, hybrid, aerial]
+ });
+
+ var treeItem = new Ext.tree.TreePanel({
+ root: new GeoExt.tree.LayerContainer({
+ text: 'Map Layers',
+ layerStore: mapStore,
+ leaf: false,
+ expanded: true
+ }),
+ enableDD: true
+ });
+ treePanel = Ext.getCmp("treepanel");
+ treePanel.add(treeItem);
+ treePanel.doLayout();
+ viewport.doLayout();
+
+ map.setCenter(new OpenLayers.LonLat(6, 46), 7);
+});
\ No newline at end of file
More information about the Commits
mailing list