From 9880a860a3cdab61ebffa5640c1db0ee2e5b3c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Thu, 2 Apr 2015 18:40:16 +0200 Subject: [PATCH] Converted examples --- examples_src/navigation-controls.html | 75 +++------- examples_src/overlay.css | 18 +++ examples_src/overlay.html | 103 +++---------- examples_src/overviewmap-custom.css | 32 ++++ examples_src/overviewmap-custom.html | 91 ++---------- examples_src/overviewmap.html | 54 ++----- examples_src/polygon-styles.css | 0 examples_src/polygon-styles.html | 73 ++------- examples_src/popup.css | 41 ++++++ examples_src/popup.html | 122 +++------------ examples_src/preload.html | 70 ++------- examples_src/regularshape.html | 64 ++------ examples_src/rotation.html | 65 ++------ examples_src/scale-line.html | 78 +++------- examples_src/select-features.html | 87 +++-------- examples_src/semi-transparent-layer.html | 64 ++------ examples_src/side-by-side.html | 86 +++-------- examples_src/snap.html | 111 +++++--------- examples_src/sphere-mollweide.html | 66 ++------- examples_src/stamen.html | 64 ++------ examples_src/static-image.html | 78 +++------- examples_src/symbol-atlas-webgl.html | 76 +++------- examples_src/synthetic-lines.html | 179 +++++++++-------------- examples_src/synthetic-points.html | 65 ++------ 24 files changed, 497 insertions(+), 1265 deletions(-) create mode 100644 examples_src/overlay.css create mode 100644 examples_src/overviewmap-custom.css create mode 100644 examples_src/polygon-styles.css create mode 100644 examples_src/popup.css diff --git a/examples_src/navigation-controls.html b/examples_src/navigation-controls.html index f4d3ba0a85..95bb614445 100644 --- a/examples_src/navigation-controls.html +++ b/examples_src/navigation-controls.html @@ -1,56 +1,19 @@ - - - - - - - - - - - Navigation controls example - - - - - -
- -
-
-
-
-
- -
- -
-

Navigation controls example

-

Shows how to add navigation controls.

- The following navigation controls are added to the map: -
    -
  • ol.control.Zoom (added by default)
  • -
  • ol.control.ZoomToExtent
  • -
-
-

See the navigation-controls.js source to see how this is done.

-
-
control, navigation, extent
-
- -
- -
- - - - - - - +--- +template: "example.html" +title: "Navigation controls example" +shortdesc: "Shows how to add navigation controls." +docs: > +

This example shows how to use the beforeRender function on the Map to run one + or more animations.

+

The following navigation controls are added to the map:

+ +tags: "control, navigation, extent" +--- +
+
+
+
+
diff --git a/examples_src/overlay.css b/examples_src/overlay.css new file mode 100644 index 0000000000..7b813f5ba9 --- /dev/null +++ b/examples_src/overlay.css @@ -0,0 +1,18 @@ +#marker { + width: 20px; + height: 20px; + border: 1px solid #088; + border-radius: 10px; + background-color: #0FF; + opacity: 0.5; +} +#vienna { + text-decoration: none; + color: white; + font-size: 11pt; + font-weight: bold; + text-shadow: black 0.1em 0.1em 0.2em; +} +.popover-content { + min-width: 180px; +} diff --git a/examples_src/overlay.html b/examples_src/overlay.html index c3351e0d22..4dfda85731 100644 --- a/examples_src/overlay.html +++ b/examples_src/overlay.html @@ -1,82 +1,21 @@ - - - - - - - - - - - - Overlay example - - - - - -
- -
-
-
-
-
- -
- -
-

Overlay example

-

Demonstrates overlays.

-
-

The popups are created using - Popovers from Bootstrap.

-

See the overlay.js source to see how this is done.

-
-
overlay, popup, bootstrap, popover, mapquest, openaerial
-
- -
- -
- -
- - Vienna -
- - -
- - - - - - - - +--- +template: "example.html" +title: "Overlay example" +shortdesc: "Demonstrates overlays." +docs: > +

The popups are created using Popovers from Bootstrap.

+tags: "overlay, popup, bootstrap, popover, mapquest, openaerial" +resources: overlay.css +--- +
+
+
+
+
+
+ + Vienna +
+ + +
diff --git a/examples_src/overviewmap-custom.css b/examples_src/overviewmap-custom.css new file mode 100644 index 0000000000..2a5d5bf07b --- /dev/null +++ b/examples_src/overviewmap-custom.css @@ -0,0 +1,32 @@ +.ol-custom-overviewmap, +.ol-custom-overviewmap.ol-uncollapsible { + bottom: auto; + left: auto; + right: 0; + top: 0; +} + +.ol-custom-overviewmap:not(.ol-collapsed) { + border: 1px solid black; +} + +.ol-custom-overviewmap .ol-overviewmap-map { + border: none; + width: 300px; +} + +.ol-custom-overviewmap .ol-overviewmap-box { + border: 2px solid red; +} + +.ol-custom-overviewmap:not(.ol-collapsed) button{ + bottom: auto; + left: auto; + right: 1px; + top: 1px; +} + +.ol-rotate { + top: 170px; + right: 0; +} diff --git a/examples_src/overviewmap-custom.html b/examples_src/overviewmap-custom.html index d00be1357d..684697018f 100644 --- a/examples_src/overviewmap-custom.html +++ b/examples_src/overviewmap-custom.html @@ -1,77 +1,14 @@ - - - - - - - - - - - - ol3 OverviewMap control with advanced customization example - - - - - -
-

OverviewMap control, advanced

-
- -
-

Example of OverviewMap control with advanced customization.

-
-

See the overviewmap-custom.js source to see how this is done.

-

This example demonstrates how you can customize the overviewmap control using its supported options as well as defining custom CSS. You can also rotate the map using the shift key to see how the overview map reacts.

-
-
overview, overviewmap
-
-
- - - - - - - +--- +template: "example.html" +title: "OverviewMap control example advanced" +shortdesc: "Example of OverviewMap control with advanced customization." +docs: > +

This example demonstrates how you can customize the overviewmap control using its supported options as well as defining custom CSS. You can also rotate the map using the shift key to see how the overview map reacts.

+tags: "overview, overviewmap" +resources: overviewmap-custom.css +--- +
+
+
+
+
diff --git a/examples_src/overviewmap.html b/examples_src/overviewmap.html index ca0a0da1a4..7a2c2d9965 100644 --- a/examples_src/overviewmap.html +++ b/examples_src/overviewmap.html @@ -1,41 +1,13 @@ - - - - - - - - - - - ol3 OverviewMap control example - - - - - -
-

OverviewMap control

-
- -
-

Example of OverviewMap control.

-
-

See the overviewmap.js source to see how this is done.

-
-
overview, overviewmap
-
-
- - - - - - - +--- +template: "example.html" +title: "OverviewMap control example" +shortdesc: "Example of OverviewMap control." +docs: > + This example demonstrates the use of the OverviewMap control. +tags: "overview, overviewmap" +--- +
+
+
+
+
diff --git a/examples_src/polygon-styles.css b/examples_src/polygon-styles.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples_src/polygon-styles.html b/examples_src/polygon-styles.html index 5464d2f097..d425638295 100644 --- a/examples_src/polygon-styles.html +++ b/examples_src/polygon-styles.html @@ -1,57 +1,16 @@ - - - - - - - - - - - - Custom styles for polygons - - - - - - -
- -
-
-
-
-
- -
- -
-

Custom styles for polygons

-

Showing the vertices of a polygon with a custom style geometry.

-
-

See the polygon-styles.js source to see how this is done.

-
-
polygon, vector, style, GeometryFunction
-
- -
- -
- - - - - - - +--- +template: "example.html" +title: "Custom styles for polygons" +shortdesc: "Showing the vertices of a polygon with a custom style geometry." +docs: > + In this example two different styles are created for the polygons: + * The first style is for the polygons themselves. + * The second style is to draw the vertices of the polygons. +tags: "polygon, vector, style, GeometryFunction" +resources: polygon-styles.css +--- +
+
+
+
+
diff --git a/examples_src/popup.css b/examples_src/popup.css new file mode 100644 index 0000000000..ddcde8dc4e --- /dev/null +++ b/examples_src/popup.css @@ -0,0 +1,41 @@ +.ol-popup { + position: absolute; + background-color: white; + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); + padding: 15px; + border-radius: 10px; + border: 1px solid #cccccc; + bottom: 12px; + left: -50px; +} +.ol-popup:after, .ol-popup:before { + top: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} +.ol-popup:after { + border-top-color: white; + border-width: 10px; + left: 48px; + margin-left: -10px; +} +.ol-popup:before { + border-top-color: #cccccc; + border-width: 11px; + left: 48px; + margin-left: -11px; +} +.ol-popup-closer { + text-decoration: none; + position: absolute; + top: 2px; + right: 8px; +} +.ol-popup-closer:after { + content: "✖"; +} diff --git a/examples_src/popup.html b/examples_src/popup.html index 272fa75009..31074d70d9 100644 --- a/examples_src/popup.html +++ b/examples_src/popup.html @@ -1,104 +1,20 @@ - - - - - - - - - - - - Popup example - - - -