Compare commits

...

6 Commits

Author SHA1 Message Date
Schuyler Erle
cbc808c5d0 Tagged release candidate 1.0-rc1 for real this time.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-1.0-rc1@694 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 20:15:14 +00:00
Schuyler Erle
8608c16344 Adding cleanup phase to build.sh.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@692 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 20:14:21 +00:00
Schuyler Erle
86d7fa176e Added some fiddling bits of documentation.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@690 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 20:10:49 +00:00
Schuyler Erle
fd1fdf2f8e Pulled up r686:r688 test fixes from trunk.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@689 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 19:58:01 +00:00
Schuyler Erle
24b58b5e0b Pulled up r679:r684 from trunk for the IE performance and bug fixes.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@685 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 19:28:31 +00:00
Schuyler Erle
83197dc4f2 Branching OpenLayers for 1.0 release.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@678 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 17:17:50 +00:00
11 changed files with 90 additions and 15 deletions

View File

@@ -33,5 +33,8 @@ echo Shrinking and post-processing...
cat ${LICENSE_HEADER_FILENAME} > ${OUTPUT_FILENAME} cat ${LICENSE_HEADER_FILENAME} > ${OUTPUT_FILENAME}
${CMD_JSMIN} <${TMP_OUTPUT_FILENAME} >> ${OUTPUT_FILENAME} ${CMD_JSMIN} <${TMP_OUTPUT_FILENAME} >> ${OUTPUT_FILENAME}
echo Cleaning up...
rm $TMP_OUTPUT_FILENAME
echo echo
echo Done. echo Done.

10
doc/authors.txt Normal file
View File

@@ -0,0 +1,10 @@
OpenLayers core development team
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Erik Uzureau
Christopher R. Schmidt
Philip Lindsay
John Frank
Schuyler Erle
OpenLayers is graciously supported by MetaCarta, Inc.
<http://www.metacarta.com>.

View File

@@ -33,10 +33,10 @@
{map: '/www/freemap.in/boston/map/mass.map', layers: 'border,water,roads', format: 'png'} ); {map: '/www/freemap.in/boston/map/mass.map', layers: 'border,water,roads', format: 'png'} );
var rapid = new OpenLayers.Layer.WMS( "Rapid Transit", var rapid = new OpenLayers.Layer.WMS( "Rapid Transit",
"http://boston.freemap.in/cgi-bin/mapserv?", "http://boston.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png'} ); {map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png', transparent:'true'} );
var buildings = new OpenLayers.Layer.WMS( "Buildings", var buildings = new OpenLayers.Layer.WMS( "Buildings",
"http://boston.freemap.in/cgi-bin/mapserv?", "http://boston.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/boston/map/mass.map', layers: 'buildings', format: 'png'} ); {map: '/www/freemap.in/boston/map/mass.map', layers: 'buildings', format: 'png', transparent:'true'} );
map.addLayer(basemap); map.addLayer(basemap);
map.addLayer(rapid); map.addLayer(rapid);

View File

@@ -55,6 +55,7 @@ OpenLayers.Control.MouseDefaults.prototype =
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
this.map.viewPortDiv.appendChild(this.zoomBox); this.map.viewPortDiv.appendChild(this.zoomBox);
} }
document.onselectstart=function() { return false; }
Event.stop(evt); Event.stop(evt);
}, },
@@ -111,6 +112,7 @@ OpenLayers.Control.MouseDefaults.prototype =
} else { } else {
this.map.setCenter(this.map.center); this.map.setCenter(this.map.center);
} }
document.onselectstart=null;
this.mouseDragStart = null; this.mouseDragStart = null;
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "default";
}, },

View File

@@ -164,6 +164,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.map.div.style.cursor = "move"; this.map.div.style.cursor = "move";
break; break;
} }
document.onselectstart = function() { return false; }
Event.stop(evt); Event.stop(evt);
}, },
@@ -247,6 +248,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.map.setCenter(this.map.center); this.map.setCenter(this.map.center);
} }
document.onselectstart = null;
this.mouseDragStart = null; this.mouseDragStart = null;
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "default";
}, },

View File

@@ -146,7 +146,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left), new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left),
tileoffsety - parseInt(this.map.layerContainerDiv.style.top)) tileoffsety - parseInt(this.map.layerContainerDiv.style.top))
); );
tile.draw(); tile.draw((this.params.TRANSPARENT == 'true'));
row.append(tile); row.append(tile);
tileoffsetlon += tilelon; tileoffsetlon += tilelon;
@@ -181,7 +181,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
bounds.top = bounds.top + deltaLat; bounds.top = bounds.top + deltaLat;
position.y = position.y + deltaY; position.y = position.y + deltaY;
var newTile = this.addTile(bounds, position); var newTile = this.addTile(bounds, position);
newTile.draw(); newTile.draw((this.params.TRANSPARENT == 'true'));
newRow.append(newTile); newRow.append(newTile);
} }
@@ -215,7 +215,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
bounds.right = bounds.right + deltaLon; bounds.right = bounds.right + deltaLon;
position.x = position.x + deltaX; position.x = position.x + deltaX;
var newTile = this.addTile(bounds, position); var newTile = this.addTile(bounds, position);
newTile.draw(); newTile.draw((this.params.TRANSPARENT == 'true'));
if (prepend) { if (prepend) {
row = row.prepend(newTile); row = row.prepend(newTile);

View File

@@ -47,7 +47,7 @@ OpenLayers.Layer.WMS.prototype =
* @type Boolean * @type Boolean
*/ */
isBaseLayer: function() { isBaseLayer: function() {
return (this.params.TRANSPARENT != true); return (this.params.TRANSPARENT != 'true');
}, },
/** /**

View File

@@ -35,12 +35,20 @@ OpenLayers.Tile.Image.prototype =
/** /**
*/ */
draw:function() { draw:function(transparent) {
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, if (transparent) {
this.position, this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
this.size, this.position,
this.url, this.size,
"absolute"); this.url,
"absolute");
} else {
this.imgDiv = OpenLayers.Util.createImage(null,
this.position,
this.size,
this.url,
"absolute");
}
this.layer.div.appendChild(this.imgDiv); this.layer.div.appendChild(this.imgDiv);
}, },

50
readme.txt Normal file
View File

@@ -0,0 +1,50 @@
OpenLayers
-=-=-=-=-=-
Copyright (c) 2005-2006 MetaCarta, Inc.
OpenLayers is a JavaScript library for building map applications
on the web. OpenLayers is made available under a BSD-license.
Please see license.txt in this distribution for more details.
------------------
Getting OpenLayers
------------------
OpenLayers lives at http://www.openlayers.org/.
You can get OpenLayers from
http://trac.openlayers.org/wiki/HowToDownload.
---------------------
Installing OpenLayers
---------------------
You can use OpenLayers as-is by copying build/OpenLayers.js and the
entire lib/ directory up to your webserver, putting them in the same
directory. To include the OpenLayers library in your web page, use:
<script type="text/javascript" src="OpenLayers.js" />
If you want to use the multiple-file version of OpenLayers (for, say,
debugging or development purposes), copy the lib/ directory up to your
webserver in the same directory you put the img/ folder. Then add
the following to your web page instead:
<script type="text/javascript" src="lib/OpenLayers.js" />
------------------------------------
Using OpenLayers in Your Own Website
------------------------------------
The examples/ directory is full of useful examples.
There is some documentation at http://trac.openlayers.org/ as well.
--------------------------
Contributing to OpenLayers
--------------------------
Please join the email lists at http://openlayers.org/EmailLists/.
Patches are welcome!
= 30 =

View File

@@ -26,7 +26,7 @@
var tile = layer.addTile(new OpenLayers.Bounds(1,2,3,4), pixel); var tile = layer.addTile(new OpenLayers.Bounds(1,2,3,4), pixel);
tile.draw(); tile.draw();
var img = tile.imgDiv.childNodes[0]; var img = tile.imgDiv;
t.eq( img.src, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=1,2,3,4&WIDTH=256&HEIGHT=256", "image src is created correctly via addtile" ); t.eq( img.src, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=1,2,3,4&WIDTH=256&HEIGHT=256", "image src is created correctly via addtile" );
t.eq( tile.imgDiv.style.top, "6px", "image top is set correctly via addtile" ); t.eq( tile.imgDiv.style.top, "6px", "image top is set correctly via addtile" );
@@ -37,7 +37,7 @@
t.ok( true, "skipping element test outside of Mozilla"); t.ok( true, "skipping element test outside of Mozilla");
else else
t.ok( firstChild instanceof HTMLElement, "div first child is an image object" ); t.ok( firstChild instanceof HTMLElement, "div first child is an image object" );
t.eq( firstChild.childNodes[0].src, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=1,2,3,4&WIDTH=256&HEIGHT=256", "div first child is correct image object" ); t.eq( firstChild.src, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=1,2,3,4&WIDTH=256&HEIGHT=256", "div first child is correct image object" );
var pos = tile.getPosition(); var pos = tile.getPosition();
t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." ); t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." );
} }

View File

@@ -35,7 +35,7 @@
tile.draw(); tile.draw();
var img = tile.imgDiv.childNodes[0]; var img = tile.imgDiv;
if (!isMozilla) if (!isMozilla)
t.ok( true, "skipping element test outside of Mozilla"); t.ok( true, "skipping element test outside of Mozilla");