Skip to content

Commit

Permalink
全景图部分,并初步实现用户订阅部分的编写。
Browse files Browse the repository at this point in the history
  • Loading branch information
fanzia committed Oct 30, 2015
1 parent 549095d commit 7c04053
Show file tree
Hide file tree
Showing 15 changed files with 978 additions and 11 deletions.
8 changes: 3 additions & 5 deletions css/Map5.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,16 @@
/*popover*/

.popover{
/*width: 300px;*/
/*width : 100px;*/
min-width: 30px;
max-width: 100%;
}
.popover .popover-title{
background-color: #
}
.popover .popover-content{
/*height: 160px;*/
min-height: 40px;
/*min-height: 20px;*/
max-height: 160px;
/*max-height: 160px;*/
max-height: none;
overflow-y: auto;
padding: 4px;
}
Expand Down
Binary file added example/images/360.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions example/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript" src="../lib/GeoBeans.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Class.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Envelope.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Color.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Renderer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Events.js"></script>
Expand Down Expand Up @@ -57,6 +58,19 @@
<script type="text/javascript" src="../lib/GeoBeans/Style/Fill.js"></script>


<script type="text/javascript" src="../lib/GeoBeans/File/File.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/File/FileManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/File/Folder.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/RasterDB/RasterDBManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/RasterDB/Raster.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileDBManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileStore.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/GPS/GPSManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/GPS/SpatialReference.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/GPS/Job.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Filter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/FilterReader.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/FilterWriter.js"></script>
Expand Down
234 changes: 234 additions & 0 deletions example/panorama.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/bootstrap-3.2.0-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/Map5.css"/>

<script type="text/javascript" src="../lib/jquery-1.11.1.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="../lib/GeoBeans.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Class.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Envelope.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/BaseTypes/Color.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/InfoWindow.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Renderer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Events.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Geometry.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/GeometryCollection.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/Point.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/LineString.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/LinearRing.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/Polygon.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/MultiPoint.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/MultiLineString.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/MultiPolygon.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Geometry/GML.js"></script>


<script type="text/javascript" src="../lib/GeoBeans/Transformation.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Control.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Control/TrackControl.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Control/DragMapControl.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Control/SrollMapControl.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Control/MapNavControl.js"></script>


<script type="text/javascript" src="../lib/GeoBeans/Field.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Feature.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/FeatureType.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Workspace.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/WFS/WFSWorkspace.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/WMS/WMSWorkspace.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Style/StyleManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Style.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/ColorMap.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/StyleReader.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/StyleWriter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Rule.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/FeatureStyle.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Symbolizer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/PointSymbolizer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/LineSymbolizer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/PolygonSymbolizer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/TextSymbolizer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Font.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Stroke.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Style/Fill.js"></script>


<script type="text/javascript" src="../lib/GeoBeans/File/File.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/File/FileManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/File/Folder.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/RasterDB/RasterDBManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/RasterDB/Raster.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileDBManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileStore.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/GPS/GPSManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/GPS/SpatialReference.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/GPS/Job.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Filter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/FilterReader.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/FilterWriter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/LogicFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/BinaryLogicFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/ComparisionFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/BinaryComparisionFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/IDFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/UnaryLogicFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/SpatialFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/BBoxFilter.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/Expression.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/PropertyName.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Filter/Literal.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/DBS/DBSManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/DBS/DataSource.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/DBS/DataSet.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/MapManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Map.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/User.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/MapWorkspace.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/FeatureLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/Tile.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/TileCache.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/TileLayer.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Layer/MapLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/WMSLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/WFSLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/OverlayLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/DBLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/FeatureDBLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/RasterDBLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/GroupLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/QueryLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/Layer/PanoramaLayer.js"></script>

<script type="text/javascript" src="../../Map5/lib/GeoBeans/Overlay.js"></script>
<script type="text/javascript" src="../../Map5/lib/GeoBeans/Overlay/Marker.js"></script>

<script type="text/javascript" src="../lib/GeoBeans/Layer/WMTSLayer.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileDBManager.js"></script>
<script type="text/javascript" src="../lib/GeoBeans/TileDB/TileStore.js"></script>

<style type="text/css">
#mapDiv{
border: 1px solid #ccc;
}
</style>
<script type="text/javascript">
var authServer = "/ows/admin/mgr";
var userName = "b";
var mapName = "b";

$().ready(function(){
var user = new GeoBeans.User(userName);
var mapManager = user.getMapManager();

mapObj = mapManager.getMap("mapDiv",mapName);

if(mapObj == null){
alert("没有该地图");
return;
}
mapObj.setViewer(mapObj.extent);
mapObj.setNavControl(false);
mapObj.draw();
});


function add360Sight(){
var html = "<div style='width:600px;height:400px;'><iframe src='http://192.168.111.152:8088/panorama/nanshan12.html' style='width:100%;height:100%'></iframe></div>";

var options = {
title : "360",
}
var infoWindow = new GeoBeans.InfoWindow(html,options);
var point = new GeoBeans.Geometry.Point(116,-40)
mapObj.openInfoWindow(infoWindow,point);
}


function add360SightByOverlay(){

}
function add360Sight2(){
var point = new GeoBeans.Geometry.Point(116,-40);
var name = "360";
var html = "http://192.168.111.152:8088/panorama/nanshan12.html";


var symbolizer = new GeoBeans.Symbolizer.PointSymbolizer();
symbolizer.icon_url = "images/marker.png";
symbolizer.icon_offset_x = 0;
symbolizer.icon_offset_y = 0;
var marker = new GeoBeans.Overlay.Marker("maker",point,symbolizer);
mapObj.addOverlay(marker);
mapObj.draw();


mapObj.overlayLayer.setHitOverlayCallback(callback);
mapObj.registerOverlayEvent();
}

function callback(overlay){
var str = (overlay == null)? null :overlay.name;
console.log(str);
if(overlay == null){
return;
}
if(overlay.isEdit){
add360Sight();
}
}


function add360Sight3(){
// var html = "http://192.168.111.152:8088/panorama/nanshan12.html";

var icon = "images/360.png";
var point = new GeoBeans.Geometry.Point(0,0);
var name = "南山";
var html = "http://192.168.111.152:8088/panorama/nanshan12.html";
mapObj.addPanorama(point,name,html,icon);

point = new GeoBeans.Geometry.Point(100,-30);
name = "接收机房";
var html = "http://192.168.111.152:8088/panorama/jieshouzhanjifang2.html";
mapObj.addPanorama(point,name,html,icon);

mapObj.draw();
}


function remove360Sight(){
var name = "南山";
mapObj.removePanorama(name);
mapObj.draw();
}

function clear360Sights(){
mapObj.clearPanoramas();
mapObj.draw();
}
</script>
<body >

<div id="mapDiv" style="height:600px;width:100%;">
</div>
<!-- <button onclick="add360Sight()">全景图</button>
<button onclick="add360Sight2()">全景图2</button> -->
<button onclick="add360Sight3()">添加全景图</button>
<button onclick="remove360Sight()">删除某一个全景图</button>
<button onclick="clear360Sights()">清空</button>
</body>
Loading

0 comments on commit 7c04053

Please sign in to comment.