Skip to content
Snippets Groups Projects
Commit 89e1b307 authored by unknown's avatar unknown
Browse files

edited

parent 03f4d9a6
No related branches found
No related tags found
No related merge requests found
a.snapchat{
position: relative;
background: lightgrey;
}
a.snapchat img {
position: absolute;
opacity: 0;
width: 100px;
height: 100px;
left: 0;
top: -20px;
transition: opacity .5s, top .5s;
}
a.snapchat:hover img {
opacity: 1;
top: 20px;
}
\ No newline at end of file
<script>
$(document).ready(function(){
$("#Image").mouseover(function(){
$("#Image").show();
});
$("#Image").mouseout(function(){
$("#Image").hide();
});
});
</script>
{% load static %} {% load static %}
<html> <head> <!DOCTYPE html>
<title>Comfy Django</title> <html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>鼠标事件</title>
<link href="http://a.amap.com/Loca/static/manual/example/style/demo.css" rel="stylesheet">
<style>
html,
body,
#container {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
</style>
</head> </head>
<body> <body>
<h1>CouchDB in Django</h1> <div id="container" class="container">
<form method="post" action="."> </div>
<!--<script src="./script/loca.js"></script>-->
<script src="http://webapi.amap.com/loca?v=1.2.0&key=393144ee0738b91f3e93b0c6d0c36562"></script>
<script src="http://a.amap.com/Loca/static/manual/example/script/demo.js"></script>
<!-- <script src=".\infoshow.js"></script> -->
<script src="./district.js"></script>
<script> <script>
var valmel = "{{city.value}}"; var map = Loca.create('container', {
mapStyle: 'amap://styles/e32987d0e34dadd472724015bb64a0f8',
zoom: 4,
center: [135, -28]
});
</script> var layer = Loca.visualLayer({
<img src="https://www.teachingtreasures.com.au/teaching-tools/gknowledgeK-3/major-cities/aussiemap.gif" eventSupport: true, // selectStyle 配置需要开启 eventSupport: true
style='position:absolute;left:15px;top:35px;z-index:0;'width="745" height="586" alt="MapTest" usemap="#ausmap"> container: map,
<img src="{% static 'images/circle.png'%}" type: 'point',
style='position:absolute;left:520px;top:455px;z-index:1;'width= height="150"alt="circlemel"> shape: 'circle'
});
layer.on('mousemove', function (ev) {
// 事件类型
var type = ev.type;
// 当前元素的原始数据
var rawData = ev.rawData;
// 原始鼠标事件
var originalEvent = ev.originalEvent;
openInfoWin(map.getMap(), originalEvent, {
'City': rawData.name,
'Location': rawData.center
});
});
layer.on('mouseleave', function (ev) {
closeInfoWin();
});
layer.setData(districts, {
lnglat: 'center'
});
<map name="ausmap"> layer.setOptions({
<area shape="circle" coords="567,483,25" alt="Melbourne" href="sun.htm"> style: {
radius: 5,
color: '#4fc2ff',
borderColor: '#ffffff',
borderWidth: 1.5,
opacity: 0.8
},
selectStyle: {
radius: 14,
color: '#ffe30a'
}
});
</map> layer.render();
</script>
<hr> <hr>
{% if cityInfo %} {% if cityInfo %}
...@@ -33,6 +97,17 @@ ...@@ -33,6 +97,17 @@
<hr>NO DATA</hr> <hr>NO DATA</hr>
{% endif %} {% endif %}
<td>{{melbourne}}</td>
<td>{{sydney}}</td>
<td>{{adelaide}}</td>
<td>{{perth}}</td>
<td>{{brisbane}}</td>
<td>{{NswCount}}</td>
<td>{{VicCount}}</td>
<td>{{SacCount}}</td>
</body> </html> </body> </html>
\ No newline at end of file
...@@ -52,6 +52,7 @@ def index(request): ...@@ -52,6 +52,7 @@ def index(request):
#print(docs) #print(docs)
#print(docs.view('city/city-view',key = "melbourne")) #print(docs.view('city/city-view',key = "melbourne"))
countId = [] countId = []
countDomesitc = 0
#print(docs['f6376ce946ac201c045408615e00d502']) #print(docs['f6376ce946ac201c045408615e00d502'])
for doc in docsNsw: for doc in docsNsw:
features = docsNsw[doc]['features'] features = docsNsw[doc]['features']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment