diff --git a/assets/info-window.css b/assets/info-window.css new file mode 100644 index 0000000..0221da7 --- /dev/null +++ b/assets/info-window.css @@ -0,0 +1,18 @@ +.toggle-info-window-container { + position: fixed; + z-index: 500; + top: 50%; + left: 240px; + padding: 10px; + background: #fff; +} +#toggle-icon { + height: 25px; + width: 25px; +} +div.w3-sidebar.closed { + left: -240px; +} +div.toggle-info-window-container.closed { + left: 0px; +} \ No newline at end of file diff --git a/assets/toggle-window.js b/assets/toggle-window.js new file mode 100644 index 0000000..d95d99c --- /dev/null +++ b/assets/toggle-window.js @@ -0,0 +1,51 @@ +'use strict'; + +// map container +var mapContainer = document.getElementById('map'); +// information window +var infoWindow = document.getElementById('info-window'); +// container for toggle button +var toggleContainer = document.getElementById('toggle-div'); +// button to toggle information window +var toggleInfoWindowButton = document.getElementById('toggle-info-window'); +// toggle image +var toggleIcon = document.getElementById('toggle-icon'); +// add click event listener +toggleInfoWindowButton.addEventListener('click', toggleInfoWindow); + +function toggleInfoWindow() { + // get listing of CSS classes + var infoWindowClassList = infoWindow.classList; + var toggleContainerClassList = toggleContainer.classList; + + // run logic based upon info window being open or closed + if (infoWindowClassList.contains('open')) { + // remove open class + infoWindowClassList.remove('open'); + toggleContainerClassList.remove('open'); + // add closed class + infoWindowClassList.add('closed'); + toggleContainerClassList.add('closed'); + // move info window off of screen to the left - css + mapContainer.style.left = '0px'; + // refresh map to prevent blank space + map.invalidateSize(); + // change toggle icon to open button + toggleIcon.src = '../img/open-arrow.png' + toggleIcon.title = 'Click to open information window'; + } else { + // remove closed class + infoWindowClassList.remove('closed'); + toggleContainerClassList.remove('closed'); + // add open class + infoWindowClassList.add('open'); + toggleContainerClassList.add('open'); + // move info window to original location + mapContainer.style.left = '240px'; + // refresh map to prevent blank space + map.invalidateSize(); + // change toggle icon to close button + toggleIcon.src = '../img/close-arrow.png' + toggleIcon.title = 'Click to hide information window'; + } +} \ No newline at end of file diff --git a/img/close-arrow.png b/img/close-arrow.png new file mode 100644 index 0000000..a4ab70c Binary files /dev/null and b/img/close-arrow.png differ diff --git a/img/open-arrow.png b/img/open-arrow.png new file mode 100644 index 0000000..8d173af Binary files /dev/null and b/img/open-arrow.png differ diff --git a/index.html b/index.html index 3f8a0ba..0e14dc2 100644 --- a/index.html +++ b/index.html @@ -8,13 +8,14 @@ + -
+
beta
@@ -27,6 +28,11 @@
+
+ +
@@ -223,5 +229,6 @@

Fill

+ diff --git a/info.html b/info.html index ac4a18d..e6a8dd2 100644 --- a/info.html +++ b/info.html @@ -28,8 +28,9 @@

About


Vector is a free GIS viewer and editing tool. It is intended for GIS users who create and manage their data in Esri's ArcServer and/or ArcGIS Online. If you use public or private Feature Services, Map Services, or Hosted Feature Services this tool is for you.

-

Vector exists not to replace fully-featured desktop GIS software. Instead, it is intended to be an alternative experience for viewing and editing your data over the web. It provides a simple interface to create and edit both geometry and attribute data. Vector does not have the complete editing tools of desktop software, but it is a great option for most editing situations.

+

Vector exists not to replace fully-featured desktop GIS software. Instead, it is intended to be an alternative experience for viewing and editing your data over the web. It provides a simple interface to create and edit both geometry and attribute data. Vector does not have the complete editing tools of desktop software, but it is a great option for most editing situations.

Vector was built using the open source libraries of Leaflet, Esri Leaflet, and Leaflet PM. These are all awesome projects. A big thank you goes out to the creators and maintainers of them. Steve Cline created Vector and maintains this site.

+

Arrow icons for toggling the information window created by Smashicons, and can be downloaded from FlatIcon. Icons are licensed by CC 3.0 BY FlatIcon.

Help


Connecting to your Services

@@ -66,8 +67,8 @@

Legal

This site does not store any of your data, URLs, metadata, user names, or passwords. It simply offers a way for you to interact with Esri services. This site does not use cookies. To restore sessions, this site uses your browser's Local Storage to store service URLs, layer styles, and desired fields for non-protected services. Tokens and passwords are not stored, so protected services will not be restored after the browser window is closed.

Vector GIS Data Editor -
+ - + \ No newline at end of file