Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added clearShapes to shapes example.

  • Loading branch information...
commit 968f26073311ca6b9be150d9db19db017c6799d4 1 parent 2cbda1f
@mmarcon authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/examples/example.shapes.html
View
17 src/examples/example.shapes.html
@@ -12,10 +12,24 @@
right: 0;
background: white;
}
+
+ .clearbutton {
+ position: absolute;
+ top: 5px;
+ left: 5px;
+ background: #222;
+ color: #fff;
+ z-index: 1000;
+ font-family: 'Helvetica', sans-serif;
+ padding: 10px;
+ border-radius: 3px;
+ cursor: pointer;
+ }
</style>
</head>
<body>
+<div class="clearbutton">Clear all shapes</div>
<div id="map"></div>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0rc1/zepto.min.js"></script>
@@ -48,6 +62,9 @@
thickness: 1,
stroke: '#111'
}});
+ $('.clearbutton').on('click', function(){
+ map.jHERE('clearShapes');
+ });
});
</script>
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.