Merge pull request #96 from ppasq/clip-n-ship
Updates on clip-n-ship pages
No files matched your search
@@ -12,6 +12,62 @@ from django.shortcuts import render
|
||||
from django.views.generic.detail import View
|
||||
from geonode.layers.views import _resolve_layer, _PERMISSION_MSG_VIEW
|
||||
|
||||
WCS_URL = settings.GEOSERVER_BASE_URL + \
|
||||
'wcs?request=getcoverage&' \
|
||||
'version=1.0.0&service=WCS&coverage={layer_name}&' \
|
||||
'format=geotiff&crs=EPSG:4326&bbox={bbox}&width={width}&' \
|
||||
'height={height}'
|
||||
|
||||
MAX_CLIP_SIZE = settings.MAXIMUM_CLIP_SIZE
|
||||
TILE_SAMPLE_SIZE = 100 # tile sample size will be 100*100
|
||||
|
||||
|
||||
def check_file_size(clipped_size):
|
||||
""" Checking file size that is allowed or not
|
||||
|
||||
:param clipped_size: File size to be checked
|
||||
:type clipped_size: float
|
||||
|
||||
:return: Checking file size is allowed or not
|
||||
:rtype: bool
|
||||
"""
|
||||
if float(clipped_size) > float(MAX_CLIP_SIZE):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def download_wcs(layername, bbox_string, width, height, raster_filepath):
|
||||
""" Download clipped image from wcs.
|
||||
|
||||
:param layername: layername for wcs request
|
||||
:type layername: str
|
||||
|
||||
:param bbox_string: bbox string for wcs request
|
||||
:type bbox_string: str
|
||||
|
||||
:param width: width for wcs request
|
||||
:type width: int
|
||||
|
||||
:param height: height for wcs request
|
||||
:type height: int
|
||||
|
||||
:param raster_filepath: filepath for downloaded wcs clipped
|
||||
:type raster_filepath: str
|
||||
|
||||
:return:
|
||||
"""
|
||||
wcs_formatted_url = WCS_URL.format(
|
||||
layer_name=layername,
|
||||
bbox=bbox_string,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
response = urllib2.urlopen(wcs_formatted_url)
|
||||
fh = open(raster_filepath, "w")
|
||||
fh.write(response.read())
|
||||
fh.close()
|
||||
|
||||
|
||||
def clip_layer(request, layername):
|
||||
"""Clipping raster layer and save to temp folder.
|
||||
@@ -66,11 +122,6 @@ def clip_layer(request, layername):
|
||||
bbox_string = ','.join(bbox_array)
|
||||
except AttributeError:
|
||||
# Call wcs command
|
||||
wcs_url = settings.GEOSERVER_LOCATION + 'wcs?request=getcoverage&' \
|
||||
'version=1.0.0&service=WCS&coverage={layer_name}&' \
|
||||
'format=geotiff&crs=EPSG:4326&bbox={bbox}&width={width}&' \
|
||||
'height={height}'
|
||||
|
||||
bbox_array = bbox_string.split(',')
|
||||
offset = 50
|
||||
x = float(bbox_array[2]) - float(bbox_array[0])
|
||||
@@ -79,24 +130,53 @@ def clip_layer(request, layername):
|
||||
y = float(bbox_array[3]) - float(bbox_array[1])
|
||||
height = int(y * 43260) + offset
|
||||
|
||||
wcs_formatted_url = wcs_url.format(
|
||||
layer_name=layername,
|
||||
bbox=bbox_string,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
width = int(width * settings.WCS_DOWNLOADED_RATIO_SIZE)
|
||||
height = int(height * settings.WCS_DOWNLOADED_RATIO_SIZE)
|
||||
|
||||
extention = 'tif'
|
||||
|
||||
# checking file size of wcs download
|
||||
# it is done by assumption by getting sample
|
||||
# 1. getting part 10x10 through wcs
|
||||
# 2. get the filesize
|
||||
# 3. times filesize by width/10 * height/10, as assumption for actual filesize
|
||||
# -------------------------------------------------
|
||||
number_tile_in_width = int(width / TILE_SAMPLE_SIZE)
|
||||
number_tile_in_height = int(height / TILE_SAMPLE_SIZE)
|
||||
|
||||
sample_filepath = os.path.join(
|
||||
temporary_folder,
|
||||
layer.title + '.sample.' + extention)
|
||||
download_wcs(
|
||||
layername, bbox_string,
|
||||
TILE_SAMPLE_SIZE,
|
||||
TILE_SAMPLE_SIZE,
|
||||
sample_filepath)
|
||||
|
||||
expected_clip_size = os.path.getsize(sample_filepath)
|
||||
# size of 10x10 times width_sample * height_sample
|
||||
expected_clip_size = expected_clip_size * (
|
||||
number_tile_in_width * number_tile_in_height
|
||||
)
|
||||
|
||||
if not check_file_size(expected_clip_size):
|
||||
response = JsonResponse({
|
||||
'error': 'Clipped file size is '
|
||||
'bigger than %s mb' % (
|
||||
int(MAX_CLIP_SIZE) / 1000000
|
||||
)
|
||||
})
|
||||
response.status_code = 403
|
||||
return response
|
||||
|
||||
# -------------------------------------------------
|
||||
|
||||
# download actual wcs clipped
|
||||
raster_filepath = os.path.join(
|
||||
temporary_folder,
|
||||
layer.title + '.' + extention)
|
||||
temporary_folder,
|
||||
layer.title + '.' + extention)
|
||||
|
||||
response = urllib2.urlopen(wcs_formatted_url)
|
||||
|
||||
fh = open(raster_filepath, "w")
|
||||
fh.write(response.read())
|
||||
fh.close()
|
||||
download_wcs(layername, bbox_string, width, height, raster_filepath)
|
||||
|
||||
if not geojson:
|
||||
response = JsonResponse({
|
||||
@@ -160,14 +240,14 @@ def clip_layer(request, layername):
|
||||
|
||||
if os.path.exists(output):
|
||||
# Check size
|
||||
max_clip_size = settings.MAXIMUM_CLIP_SIZE
|
||||
clipped_size = os.path.getsize(output)
|
||||
|
||||
if float(clipped_size) > float(max_clip_size):
|
||||
max_clip_size_mb = int(max_clip_size) / 1000000
|
||||
if not check_file_size(clipped_size):
|
||||
response = JsonResponse({
|
||||
'error': 'Clipped file size is '
|
||||
'bigger than ' + str(max_clip_size_mb) + ' mb'
|
||||
'bigger than %s mb' % (
|
||||
int(MAX_CLIP_SIZE) / 1000000
|
||||
)
|
||||
})
|
||||
response.status_code = 403
|
||||
return response
|
||||
@@ -285,7 +365,7 @@ class ClipView(View):
|
||||
settings.GEOSERVER_PUBLIC_LOCATION,
|
||||
geotiffname
|
||||
),
|
||||
'service_typename': 'geonode:'+geotiffname
|
||||
'service_typename': 'geonode:' + geotiffname
|
||||
}
|
||||
}
|
||||
return render(request, self.template_name, context)
|
||||
@@ -101,10 +101,20 @@ INSTALLED_APPS = INSTALLED_APPS + (
|
||||
'filter'
|
||||
)
|
||||
|
||||
GEOSERVER_PUBLIC_LOCATION = os.getenv(
|
||||
'GEOSERVER_PUBLIC_LOCATION', 'http://haitidata.dev.ithacaweb.org/geoserver/'
|
||||
GEOSERVER_PUBLIC_LOCATION = os.environ.get(
|
||||
'GEOSERVER_PUBLIC_LOCATION', 'http://88.99.166.60:32208/geoserver/'
|
||||
)
|
||||
|
||||
# dynamic setting based on domain
|
||||
GEOSERVER_BASE_URL = os.environ.get(
|
||||
'GEOSERVER_BASE_URL',
|
||||
'http://88.99.166.60:32208/geoserver/'
|
||||
) # change this to geoserver container location
|
||||
|
||||
#GEOSERVER_BASE_URL = GEOSERVER_PUBLIC_LOCATION = os.getenv(
|
||||
# 'GEOSERVER_PUBLIC_LOCATION', 'http://haitidata.dev.ithacaweb.org/geoserver/'
|
||||
#)
|
||||
|
||||
LAYER_PREVIEW_LIBRARY = 'react'
|
||||
|
||||
TEMPLATES[0]['DIRS'].insert(0, os.path.join(LOCAL_ROOT, "templates"))
|
||||
@@ -189,6 +199,8 @@ SOCIAL_ORIGINS = [{
|
||||
"css_class":"gp"
|
||||
}]
|
||||
|
||||
WCS_DOWNLOADED_RATIO_SIZE = 1
|
||||
|
||||
MAX_CSV_RECORDS = 20000
|
||||
|
||||
UPLOADER = {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url('images/spritesheet.png');background-image:linear-gradient(transparent,transparent),url('images/spritesheet.svg');background-repeat:no-repeat;background-size:270px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url('images/spritesheet-2x.png');background-image:linear-gradient(transparent,transparent),url('images/spritesheet.svg')}
|
||||
.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}
|
||||
.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#FFF;font:11px/19px "Helvetica Neue",Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}
|
||||
.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}
|
||||
.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}
|
||||
.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}
|
||||
.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px "Helvetica Neue",Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}
|
||||
.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}
|
||||
.leaflet-edit-marker-selected{background-color:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -1,156 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 600 60"
|
||||
height="60"
|
||||
width="600"
|
||||
id="svg4225"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="spritesheet.svg"
|
||||
inkscape:export-filename="/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<metadata
|
||||
id="metadata4258">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs4256" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview4254"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.3101852"
|
||||
inkscape:cx="237.56928"
|
||||
inkscape:cy="7.2419621"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4225" />
|
||||
<g
|
||||
id="enabled"
|
||||
style="fill:#464646;fill-opacity:1">
|
||||
<g
|
||||
id="polyline"
|
||||
style="fill:#464646;fill-opacity:1">
|
||||
<path
|
||||
d="m 18,36 0,6 6,0 0,-6 -6,0 z m 4,4 -2,0 0,-2 2,0 0,2 z"
|
||||
id="path4229"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
d="m 36,18 0,6 6,0 0,-6 -6,0 z m 4,4 -2,0 0,-2 2,0 0,2 z"
|
||||
id="path4231"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
d="m 23.142,39.145 -2.285,-2.29 16,-15.998 2.285,2.285 z"
|
||||
id="path4233"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 540 60" height="60" width="540">
|
||||
<g id="enabled" fill="#464646">
|
||||
<g id="polyline">
|
||||
<path d="M18 36v6h6v-6h-6zm4 4h-2v-2h2v2z"/>
|
||||
<path d="M36 18v6h6v-6h-6zm4 4h-2v-2h2v2z"/>
|
||||
<path d="M23.142 39.145l-2.285-2.29 16-15.998 2.285 2.285z"/>
|
||||
</g>
|
||||
<path id="polygon" d="M100 24.565l-2.096 14.83L83.07 42 76 28.773 86.463 18z"/>
|
||||
<path id="rectangle" d="M140 20h20v20h-20z"/>
|
||||
<path id="circle" d="M221 30c0 6.078-4.926 11-11 11s-11-4.922-11-11c0-6.074 4.926-11 11-11s11 4.926 11 11z"/>
|
||||
<path id="marker" d="M270,19c-4.971,0-9,4.029-9,9c0,4.971,5.001,12,9,14c4.001-2,9-9.029,9-14C279,23.029,274.971,19,270,19z M270,31.5c-2.484,0-4.5-2.014-4.5-4.5c0-2.484,2.016-4.5,4.5-4.5c2.485,0,4.5,2.016,4.5,4.5C274.5,29.486,272.485,31.5,270,31.5z"/>
|
||||
<g id="edit">
|
||||
<path d="M337,30.156v0.407v5.604c0,1.658-1.344,3-3,3h-10c-1.655,0-3-1.342-3-3v-10c0-1.657,1.345-3,3-3h6.345 l3.19-3.17H324c-3.313,0-6,2.687-6,6v10c0,3.313,2.687,6,6,6h10c3.314,0,6-2.687,6-6v-8.809L337,30.156"/>
|
||||
<path d="M338.72 24.637l-8.892 8.892H327V30.7l8.89-8.89z"/>
|
||||
<path d="M338.697 17.826h4v4h-4z" transform="rotate(-134.99 340.703 19.817)"/>
|
||||
</g>
|
||||
<g id="remove">
|
||||
<path d="M381 42h18V24h-18v18zm14-16h2v14h-2V26zm-4 0h2v14h-2V26zm-4 0h2v14h-2V26zm-4 0h2v14h-2V26z"/>
|
||||
<path d="M395 20v-4h-10v4h-6v2h22v-2h-6zm-2 0h-6v-2h6v2z"/>
|
||||
</g>
|
||||
</g>
|
||||
<path
|
||||
id="polygon"
|
||||
d="M 100,24.565 97.904,39.395 83.07,42 76,28.773 86.463,18 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
id="rectangle"
|
||||
d="m 140,20 20,0 0,20 -20,0 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
id="circle"
|
||||
d="m 221,30 c 0,6.078 -4.926,11 -11,11 -6.074,0 -11,-4.922 -11,-11 0,-6.074 4.926,-11 11,-11 6.074,0 11,4.926 11,11 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
id="marker"
|
||||
d="m 270,19 c -4.971,0 -9,4.029 -9,9 0,4.971 5.001,12 9,14 4.001,-2 9,-9.029 9,-14 0,-4.971 -4.029,-9 -9,-9 z m 0,12.5 c -2.484,0 -4.5,-2.014 -4.5,-4.5 0,-2.484 2.016,-4.5 4.5,-4.5 2.485,0 4.5,2.016 4.5,4.5 0,2.486 -2.015,4.5 -4.5,4.5 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<g
|
||||
id="edit"
|
||||
style="fill:#464646;fill-opacity:1">
|
||||
<path
|
||||
d="m 337,30.156 0,0.407 0,5.604 c 0,1.658 -1.344,3 -3,3 l -10,0 c -1.655,0 -3,-1.342 -3,-3 l 0,-10 c 0,-1.657 1.345,-3 3,-3 l 6.345,0 3.19,-3.17 -9.535,0 c -3.313,0 -6,2.687 -6,6 l 0,10 c 0,3.313 2.687,6 6,6 l 10,0 c 3.314,0 6,-2.687 6,-6 l 0,-8.809 -3,2.968"
|
||||
id="path4240"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
d="m 338.72,24.637 -8.892,8.892 -2.828,0 0,-2.829 8.89,-8.89 z"
|
||||
id="path4242"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
d="m 338.697,17.826 4,0 0,4 -4,0 z"
|
||||
transform="matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)"
|
||||
id="path4244"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<g id="disabled" fill="#bbb" transform="translate(120)">
|
||||
<use xlink:href="#edit" id="edit-disabled"/>
|
||||
<use xlink:href="#remove" id="remove-disabled"/>
|
||||
</g>
|
||||
<g
|
||||
id="remove"
|
||||
style="fill:#464646;fill-opacity:1">
|
||||
<path
|
||||
d="m 381,42 18,0 0,-18 -18,0 0,18 z m 14,-16 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z"
|
||||
id="path4247"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
<path
|
||||
d="m 395,20 0,-4 -10,0 0,4 -6,0 0,2 22,0 0,-2 -6,0 z m -2,0 -6,0 0,-2 6,0 0,2 z"
|
||||
id="path4249"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#464646;fill-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="disabled"
|
||||
transform="translate(120,0)"
|
||||
style="fill:#bbbbbb">
|
||||
<use
|
||||
xlink:href="#edit"
|
||||
id="edit-disabled"
|
||||
x="0"
|
||||
y="0"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
<use
|
||||
xlink:href="#remove"
|
||||
id="remove-disabled"
|
||||
x="0"
|
||||
y="0"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="circle-3"
|
||||
d="m 581.65725,30 c 0,6.078 -4.926,11 -11,11 -6.074,0 -11,-4.922 -11,-11 0,-6.074 4.926,-11 11,-11 6.074,0 11,4.926 11,11 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -6,4 +6,4 @@
|
||||
http://leafletjs.com
|
||||
*/
|
||||
!function(t,e,i){L.drawVersion="0.4.10",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes.",text:"Save"},cancel:{title:"Cancel editing, discards all changes.",text:"Cancel"},clearAll:{title:"clear all layers.",text:"Clear All"}},buttons:{edit:"Edit layers.",editDisabled:"No layers to edit.",remove:"Delete layers.",removeDisabled:"No layers to delete."}},handlers:{edit:{tooltip:{text:"Drag handles, or marker to edit feature.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove"}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({includes:L.Mixin.Events,initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){this._map.fire("draw:canceled",{layerType:this.type}),27===t.keyCode&&this.disable()}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",thisLine truncated
|
||||
this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds(),e=t.getCenter();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target,o=i._cornerIndex;this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)},_onMarkerDragEnd:function(t){var e,i,o=t.target;o===this._moveMarker&&(e=this._shape.getBounds(),i=e.getCenter(),o.setLatLng(i)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=this._shape.getBounds(),n=o.getCenter(),s=[],a=0,r=i.length;a<r;a++)e=[i[a].lat-n.lat,i[a].lng-n.lng],s.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(s),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_move:function(t){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e),this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e=this._moveMarker.getLatLng(),i=e.distanceTo(t);this._shape.setRadius(i),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart),L.DomEvent.off(this._container,"touchend",this._onTouchEnd),L.DomEvent.off(this._container,"touchmove",this._onTouchMove),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDowm",this._onTouchStart),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i)Line truncated
|
||||
this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds(),e=t.getCenter();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target,o=i._cornerIndex;this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)},_onMarkerDragEnd:function(t){var e,i,o=t.target;o===this._moveMarker&&(e=this._shape.getBounds(),i=e.getCenter(),o.setLatLng(i)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=this._shape.getBounds(),n=o.getCenter(),s=[],a=0,r=i.length;a<r;a++)e=[i[a].lat-n.lat,i[a].lng-n.lng],s.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(s),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_move:function(t){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e),this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e=this._moveMarker.getLatLng(),i=e.distanceTo(t);this._shape.setRadius(i),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart),L.DomEvent.off(this._container,"touchend",this._onTouchEnd),L.DomEvent.off(this._container,"touchmove",this._onTouchMove),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDowm",this._onTouchStart),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i)Line truncated
|
||||
|
After Width: | Height: | Size: 55 KiB |
@@ -0,0 +1,160 @@
|
||||
/***************************************************************************************************
|
||||
LoadingOverlay - A flexible loading overlay jQuery plugin
|
||||
Author : Gaspare Sganga
|
||||
Version : 1.5.3
|
||||
License : MIT
|
||||
Documentation : http://gasparesganga.com/labs/jquery-loading-overlay/
|
||||
****************************************************************************************************/
|
||||
(function($, undefined){
|
||||
// Default Settings
|
||||
var _defaults = {
|
||||
color : "rgba(255, 255, 255, 0.8)",
|
||||
custom : "",
|
||||
fade : true,
|
||||
fontawesome : "",
|
||||
image : "data:image/gif;base64,R0lGODlhZABkAKUAADQyNJyanGRmZMzOzExOTLS2tISChOzq7ERCRKyqrHR2dNze3FxaXMTCxIyOjPT29Dw6PKSipGxubNTW1FRWVLy+vIyKjPTy9ExKTLSytHx+fOTm5GRiZMzKzJSWlPz+/DQ2NJyenGxqbNTS1FRSVLy6vISGhOzu7ERGRKyurHx6fOTi5FxeXMTGxJSSlPz6/Dw+PKSmpH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igIJFHsBSDByEMEB6TVFZp5ZVYZqnlllx26eWXrlwwQQcjDHnlBi6cAYMGSzrHxJRK4LUhACZAB5IA911xQIrNtNkbXn2A4AKcR6xwIIe1NNdLGirEeMQFKqTVY2+wqEmgFZWmAcKEzj0wQgEjTErFAhpQoICUYKaq6qqsturqq7CyekIMMijQgqOC4KYbTi/IkAYEMeCax1EahWDmRQbRwUJXwyzAILA3zUgHDO240gIGh9zUQYknWrIAC2mUVdMLaKEBQgpXwuLxQQkicHTsRRuEoIAGBVRFxQcTRBDCCOka0YSoND1wwgWEHhEbBRCAQEADBYt3QrloMPAukQccqgZqWV7gaxosTCzewSAoXEHDRC6QQAzFxaqyJUEAACH5BAkFADLine truncated
|
||||
imagePosition : "center center",
|
||||
maxSize : "100px",
|
||||
minSize : "20px",
|
||||
resizeInterval : 50,
|
||||
size : "50%",
|
||||
zIndex : 9999
|
||||
};
|
||||
|
||||
$.LoadingOverlaySetup = function(settings){
|
||||
$.extend(true, _defaults, settings);
|
||||
};
|
||||
|
||||
$.LoadingOverlay = function(action, options){
|
||||
switch (action.toLowerCase()) {
|
||||
case "show":
|
||||
var settings = $.extend(true, {}, _defaults, options);
|
||||
_Show("body", settings);
|
||||
break;
|
||||
|
||||
case "hide":
|
||||
_Hide("body", options);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.LoadingOverlay = function(action, options){
|
||||
switch (action.toLowerCase()) {
|
||||
case "show":
|
||||
var settings = $.extend(true, {}, _defaults, options);
|
||||
return this.each(function(){
|
||||
_Show(this, settings);
|
||||
});
|
||||
|
||||
case "hide":
|
||||
return this.each(function(){
|
||||
_Hide(this, options);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function _Show(container, settings){
|
||||
container = $(container);
|
||||
var wholePage = container.is("body");
|
||||
var count = container.data("LoadingOverlayCount");
|
||||
if (count === undefined) count = 0;
|
||||
if (count == 0) {
|
||||
var overlay = $("<div>", {
|
||||
class : "loadingoverlay",
|
||||
css : {
|
||||
"background-color" : settings.color,
|
||||
"position" : "relative",
|
||||
"display" : "flex",
|
||||
"flex-direction" : "column",
|
||||
"align-items" : "center",
|
||||
"justify-content" : "center"
|
||||
}
|
||||
});
|
||||
if (settings.zIndex !== undefined) overlay.css("z-index", settings.zIndex);
|
||||
if (settings.image) overlay.css({
|
||||
"background-image" : "url(" + settings.image + ")",
|
||||
"background-position" : settings.imagePosition,
|
||||
"background-repeat" : "no-repeat"
|
||||
});
|
||||
if (settings.fontawesome) $("<div>", {
|
||||
class : "loadingoverlay_fontawesome " + settings.fontawesome
|
||||
}).appendTo(overlay);
|
||||
if (settings.custom) $(settings.custom).appendTo(overlay);
|
||||
if (wholePage) {
|
||||
overlay.css({
|
||||
"position" : "fixed",
|
||||
"top" : 0,
|
||||
"left" : 0,
|
||||
"width" : "100%",
|
||||
"height" : "100%"
|
||||
});
|
||||
} else {
|
||||
overlay.css("position", (container.css("position") == "fixed") ? "fixed" : "absolute");
|
||||
}
|
||||
_Resize(container, overlay, settings, wholePage);
|
||||
if (settings.resizeInterval > 0) {
|
||||
var resizeIntervalId = setInterval(function(){
|
||||
_Resize(container, overlay, settings, wholePage);
|
||||
}, settings.resizeInterval);
|
||||
container.data("LoadingOverlayResizeIntervalId", resizeIntervalId);
|
||||
}
|
||||
if (!settings.fade) {
|
||||
settings.fade = [0, 0];
|
||||
} else if (settings.fade === true) {
|
||||
settings.fade = [400, 200];
|
||||
} else if (typeof settings.fade == "string" || typeof settings.fade == "number") {
|
||||
settings.fade = [settings.fade, settings.fade];
|
||||
}
|
||||
container.data({
|
||||
"LoadingOverlay" : overlay,
|
||||
"LoadingOverlayFadeOutDuration" : settings.fade[1]
|
||||
});
|
||||
overlay
|
||||
.hide()
|
||||
.appendTo("body")
|
||||
.fadeIn(settings.fade[0]);
|
||||
}
|
||||
count++;
|
||||
container.data("LoadingOverlayCount", count);
|
||||
}
|
||||
|
||||
function _Hide(container, force){
|
||||
container = $(container);
|
||||
var count = container.data("LoadingOverlayCount");
|
||||
if (count === undefined) return;
|
||||
count--;
|
||||
if (force || count <= 0) {
|
||||
var resizeIntervalId = container.data("LoadingOverlayResizeIntervalId");
|
||||
if (resizeIntervalId) clearInterval(resizeIntervalId);
|
||||
container.data("LoadingOverlay").fadeOut(container.data("LoadingOverlayFadeOutDuration"), function(){
|
||||
$(this).remove()
|
||||
});
|
||||
container.removeData(["LoadingOverlay", "LoadingOverlayCount", "LoadingOverlayFadeOutDuration", "LoadingOverlayResizeIntervalId"]);
|
||||
} else {
|
||||
container.data("LoadingOverlayCount", count);
|
||||
}
|
||||
}
|
||||
|
||||
function _Resize(container, overlay, settings, wholePage){
|
||||
if (!wholePage) {
|
||||
var x = (container.css("position") == "fixed") ? container.position() : container.offset();
|
||||
overlay.css({
|
||||
top : x.top + parseInt(container.css("border-top-width"), 10),
|
||||
left : x.left + parseInt(container.css("border-left-width"), 10),
|
||||
width : container.innerWidth(),
|
||||
height : container.innerHeight()
|
||||
});
|
||||
}
|
||||
var c = wholePage ? $(window) : container;
|
||||
var size = "auto";
|
||||
if (settings.size && settings.size != "auto") {
|
||||
size = Math.min(c.innerWidth(), c.innerHeight()) * parseFloat(settings.size) / 100;
|
||||
if (settings.maxSize && size > parseInt(settings.maxSize, 10)) size = parseInt(settings.maxSize, 10) + "px";
|
||||
if (settings.minSize && size < parseInt(settings.minSize, 10)) size = parseInt(settings.minSize, 10) + "px";
|
||||
}
|
||||
overlay.css("background-size", size);
|
||||
overlay.children(".loadingoverlay_fontawesome").css("font-size", size);
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="panel panel-default" id="composerCart">
|
||||
<div class="panel-heading">Panier</div>
|
||||
<div class="panel-body">
|
||||
<p ng-show="!cart.getCart().items.length">Ajoutez des ressources à l'aide des boutons "Ajouter au panier".</p>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" ng-repeat="resource in cart.getCart().items">{{ resource.title | limitTo: 25}}{{ resource.title.length > 25 ? '...' : '' }}<button class="btn btn-default btn-xs pull-right" ng-click="cart.removeItem(resource)"><i class="fa fa-remove fa-lg"></i></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,138 @@
|
||||
<script type='text/html' id='errorTemplate'>
|
||||
<li class='alert alert-error'>
|
||||
<button class='close' data-dismiss='alert'>×</button>
|
||||
<strong><%= title %></strong><p><%= message %></p>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script type='text/html' id='infoTemplate'>
|
||||
<div class='alert <%= level %>'><p><%= message %></p></div>
|
||||
</script>
|
||||
|
||||
<script type='text/html' id='layerTemplate'>
|
||||
<div class='file-element' id='<%= selector %>-element'>
|
||||
<div class='row'>
|
||||
<div class='span6'><h3><%= name %></h3></div>
|
||||
<div class='span2'><h3><%= type %><h3></div>
|
||||
</div>
|
||||
<% if (format !== 'raster') { %>
|
||||
<div id='<%= name %>-vector-options' class='row span8'>
|
||||
<% if (time) { %>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>-time' name='<%= name %>-time'/><label for="<%= name %>-time"> Configure Time</label>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (geogig) { %>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>:geogig_toggle' name='<%= name %>:geogig_toggle'/><label for="<%= name %>:geogig_toggle"> Import to Geogig</label>
|
||||
</div>
|
||||
<div id="<%= name %>:geogig_store" name='<%= name %>:geogig_store' style="width: 225px; visibility:hidden;padding:5px"></div>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (format == 'raster') { %>
|
||||
<div id='<%= name %>-raster-options' class='row span8'>
|
||||
<% if (mosaic) { %>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>-mosaic' name='<%= name %>-mosaic'/><label for="<%= name %>-mosaic"> Configure as a Mosaic</label>
|
||||
<div id='<%= name %>-mosaic-options' class='row span8' style='display:none'>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>-mosaic-granule' name='<%= name %>-mosaic-granule'/><label for="<%= name %>-mosaic-granule"> Is a Granule of an existing Mosaic</label>
|
||||
</div>
|
||||
<div class="checkbox" id='<%= name %>-mosaic-granule-format-options' style='display:none'>
|
||||
<select id='<%= name %>-mosaic-granule-format-select' name='<%= name %>-mosaic-granule-format-select'>
|
||||
</select><label for='<%= name %>-mosaic-granule-format-select'> Available Mosaics</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>-timedim' name='<%= name %>-timedim'/><label for="<%= name %>-timedim"> Has TIME Dimension</label>
|
||||
</div>
|
||||
<div id='<%= name %>-mosaic-timedim-options' class='row span8' style='display:none'>
|
||||
<div class="checkbox">
|
||||
<select id='<%= name %>-timedim-format-select' name='<%= name %>-timedim-format-select'>
|
||||
<option selected="true" value="[0-9]{8}">YYYYMMDD</option>
|
||||
<option value="[0-9]{8}T[0-9]{6}">YYYYMMDD'T'hhmmss</option>
|
||||
<option value="[0-9]{8}T[0-9]{6}Z">YYYYMMDD'T'hhmmss'Z'</option>
|
||||
</select><label for='<%= name %>-timedim-format-select'> Date/Time Format</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input type='text' id='<%= name %>-timedim-value' name='<%= name %>-timedim-value'/><label for="<%= name %>-timedim-value"> Date/Time Vlaue</label> <em><strong><font color="red"><span id='<%= name %>-timedim-value-valid' name='<%= name %>-timedim-value-valid'>*</span></font></strong></em>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input type='checkbox' id='<%= name %>-timedim-presentation' name='<%= name %>-timedim-presentation'/><label for="<%= name %>-timedim-presentation"> Advanced TIME Presentation Options</label>
|
||||
</div>
|
||||
<div id='<%= name %>-mosaic-timedim-presentation-options' class='row span8' style='display:none'>
|
||||
<div class="checkbox">
|
||||
<select id='<%= name %>-timedim-presentation-format-select' name='<%= name %>-timedim-presentation-format-select'>
|
||||
<option value="LIST" selected="true">List</option>
|
||||
<option value="DISCRETE_INTERVAL">Interval and Resolution</option>
|
||||
<option value="CONTINUOUS_INTERVAL">Continuous Interval</option>
|
||||
</select><label for='<%= name %>-timedim-presentation-format-select'> Presentation</label>
|
||||
<div class="checkbox" id='<%= name %>-mosaic-timedim-presentation-res-options' class='row span7' style='display:none'>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="<%= name %>-timedim-presentation-years"> Years</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-months"> Months</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-weeks"> Weeks</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-days"> Days</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-hours"> Hours</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-minutes"> Minutes</label></td>
|
||||
<td><label for="<%= name %>-timedim-presentation-seconds"> Seconds</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-years' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-months' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-weeks' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-days' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-hours' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-minutes' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
<td><input type='text' id='<%= name %>-timedim-presentation-seconds' style='width:80px' onkeypress='return event.charCode >= 48 && event.charCode <= 57' value='0'/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<select id='<%= name %>-timedim-defaultvalue-format-select' name='<%= name %>-timedim-defaultvalue-format-select'>
|
||||
<option value="" selected="true">Use the built-in method to select the value</option>
|
||||
<option value="MINIMUM">Use the smallest domain value</option>
|
||||
<option value="MAXIMUM">Use the biggest domain value</option>
|
||||
<option value="NEAREST">Use the domain value nearest to the reference value</option>
|
||||
<option value="FIXED">Use the the reference value</option>
|
||||
</select><label for='<%= name %>-timedim-defaultvalue-format-select'> Default Value</label>
|
||||
<div class="checkbox" id='<%= name %>-mosaic-timedim-defaultvalue-res-options' class='row span7' style='display:none'>
|
||||
<input type='text' id='<%= name %>-timedim-defaultvalue-ref-value' name='<%= name %>-timedim-defaultvalue-ref-value' style='width:300px' value=''/><label for="<%= name %>-timedim-defaultvalue-ref-value"> Reference Value</label> <em><strong><font color="red"><span id='<%= name %>-timedim-defaultvalue-ref-value-valid' name='<%= name %>-timedim-defaultvalue-ref-value-valid'> * reference time value must be an ISO 8601 DateTime</span></font></strong></em>
|
||||
<br/><em><font color="light-gray"><span>e.g.: YYYY-MM-DDThh:mm:ss+00:02</span></font></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
<hr />
|
||||
<div id="<%= name %>-files" class="row span8">
|
||||
<ul class='files'></ul>
|
||||
<ul class='errors'></ul>
|
||||
<div id='status'></div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type='text/html' id='progressTemplate'>
|
||||
<div class='alert <%= alertLevel %>'>
|
||||
<p><%= message %></p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type='text/html' id='successTemplate'>
|
||||
|
||||
<div class='alert alert-success'>
|
||||
<p>Your layer has been upload successfully</p>
|
||||
a href="/data/geonode:<%= name %>" class='btn'>Layer page</a>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
@@ -9,6 +9,7 @@
|
||||
{% block body_class %}layers{% endblock %}
|
||||
|
||||
{% block body_outer %}
|
||||
<div id="download-clip-error-message" class="label label-danger" style="margin-bottom: 50px; display: none">Error message</div>
|
||||
<div id="download-clip-map"></div>
|
||||
|
||||
<button type="button" class="btn btn-primary btn-md btn-block" data-toggle="modal" data-target="#download_clip_page" id="download-clip-button">Download Clip</button>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
<link rel="stylesheet" href="{% static 'geonode/css/leaflet.draw.css' %}"/>
|
||||
<script src="{% static 'geonode/js/draw/leaflet.draw.js' %}"></script>
|
||||
<script src="{% static 'js/loadingoverlay.js' %}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -101,16 +102,19 @@
|
||||
|
||||
function download_clip_layer(clipUrl, geometry_url) {
|
||||
var ship_url = clipUrl + '/clip-layer?' + geometry_url;
|
||||
$('#download-clip-map').LoadingOverlay("show", {image: "/static/img/loading-spinner.gif"});
|
||||
$.ajax({
|
||||
url: ship_url,
|
||||
type: 'GET',
|
||||
success: function (result) {
|
||||
$('#download-clip-map').LoadingOverlay("hide");
|
||||
$('#download-clip-button').prop('disabled', false);
|
||||
var clip_filename = result['clip_filename'];
|
||||
location.href = clipUrl + '/' + clip_filename + '/download-clip';
|
||||
editableLayers.clearLayers();
|
||||
},
|
||||
error: function (result) {
|
||||
$('#download-clip-map').LoadingOverlay("hide");
|
||||
$('#download-clip-button').prop('disabled', false);
|
||||
var error_message = result['responseJSON']['error'];
|
||||
var $errorMessageDisplay = $('#download-clip-error-message');
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<li id="nav_imagery">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Imagery" %}<i class="fa fa-angle-down fa-lg"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/clip/Haiti25cm-PaP-extract">{% trans "Orthophotos" %}</a></li>
|
||||
<li><a href="/clip/ortho_images">{% trans "Orthophotos" %}</a></li>
|
||||
<li> <a href="/clip/lidar">{% trans "DSM" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||