Ai
1 Star 0 Fork 0

opengis-leaflet/leaflet-fractal

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 2.81 KB
一键复制 编辑 原始数据 按行查看 历史
Alexander Parshin 提交于 2013-04-13 13:51 +08:00 . Add palette control
<!DOCTYPE html>
<html>
<head>
<title>Leaflet TileLayer.Canvas with Web Workers example</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />
<link rel="stylesheet" href="PaletteControl.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js"></script>
<script src="leaflet-hash.js"></script>
<script src="Palettes.js"></script>
<script src="PaletteControl.js"></script>
<script src="FractalLayer.js"></script>
<style>
body, html, #map {
width: 100%;
height: 100%;
margin: 0px;
}
</style>
<!--Fork Me on Github ribbon, we're using the awsome version from simonwhitaker available at https://github.com/simonwhitaker/github-fork-ribbon-css -->
<link rel="stylesheet" href="gh-fork-ribbon.css" />
</head>
<body>
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
<a href="https://github.com/aparshin/leaflet-fractal">Fork me on GitHub</a>
</div>
</div>
<div id="map"></div>
<script type="text/javascript">
var map = L.map('map', {minZoom:1});
var numWorkers = 3;
var layers = {
"mandlebrot":L.tileLayer.fractalLayer(paletteController, numWorkers).addTo(map),
"multibrot3":L.tileLayer.fractalLayer(paletteController, numWorkers,"multibrot3",300),
//Dosn't work at the moment "multibrot5":L.tileLayer.fractalLayer(6,"multibrot5",200),
"burning ship":L.tileLayer.fractalLayer(paletteController, numWorkers,"burningShip"),
"tricorn":L.tileLayer.fractalLayer(paletteController, numWorkers,"tricorn"),
"julia -0.74543+0.11301*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia"),
"julia -0.75+0.11*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",500,-0.75,0.11),
"julia -0.1+0.651*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",500,-0.1,0.651),
"julia -0.4+0.6*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",500,-0.4,0.6),
"julia -0.8+0.156*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",500,-0.8,0.156),
"julia -1.118484848+0.273636364*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",300,-1.118484848,0.273636364),
"julia -0.37+0.6*i":L.tileLayer.fractalLayer(paletteController, numWorkers,"julia",500,-0.37,0.6)
}
var lc=L.control.layers(layers,{},{position:"topleft",collapsed:false}).addTo(map);
map.setView([0, -90], 2).addHash({lc:lc}).addControl(new PaletteControl(layers, {position: "topleft"}));
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opengis-leaflet/leaflet-fractal.git
git@gitee.com:opengis-leaflet/leaflet-fractal.git
opengis-leaflet
leaflet-fractal
leaflet-fractal
master

搜索帮助