Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OKU-GIS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhamad
OKU-GIS
Commits
c8c11979
Commit
c8c11979
authored
Jan 26, 2022
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pbb edit bangunan
parent
8ed17adf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
246 additions
and
45 deletions
+246
-45
API/__pycache__/views.cpython-36.pyc
API/__pycache__/views.cpython-36.pyc
+0
-0
API/views.py
API/views.py
+11
-2
static/js/scripts_js_m.js
static/js/scripts_js_m.js
+193
-1
static/js/scripts_js_o.js
static/js/scripts_js_o.js
+38
-38
templates/maps/perbaikan.html
templates/maps/perbaikan.html
+4
-4
No files found.
API/__pycache__/views.cpython-36.pyc
View file @
c8c11979
No preview for this file type
API/views.py
View file @
c8c11979
...
@@ -729,7 +729,11 @@ def building(request):
...
@@ -729,7 +729,11 @@ def building(request):
gb.db_tipe,
gb.db_tipe,
gb.remark,
gb.remark,
gb.point_id,
gb.point_id,
gb.point_name
gb.point_name,
gb.njop,
gb.njoptkp,
gb.njkp,
gb.pbb
),
),
'geometry',
'geometry',
ST_AsGeoJSON ( gb.geom :: geometry ) :: json
ST_AsGeoJSON ( gb.geom :: geometry ) :: json
...
@@ -1394,6 +1398,11 @@ def validatedit(request):
...
@@ -1394,6 +1398,11 @@ def validatedit(request):
remark
=
request
.
POST
.
get
(
'remarkbe'
)
remark
=
request
.
POST
.
get
(
'remarkbe'
)
namapoin
=
request
.
POST
.
get
(
'napo'
)
namapoin
=
request
.
POST
.
get
(
'napo'
)
njoptkp
=
request
.
POST
.
get
(
'njoptkp'
)
njop
=
request
.
POST
.
get
(
'njoppbb'
)
njkp
=
request
.
POST
.
get
(
'njkp'
)
pbb
=
request
.
POST
.
get
(
'pbb'
)
co_edit
=
cood_edit
[
'geometry'
][
'coordinates'
]
co_edit
=
cood_edit
[
'geometry'
][
'coordinates'
]
# print(co_edit)
# print(co_edit)
...
@@ -1429,7 +1438,7 @@ def validatedit(request):
...
@@ -1429,7 +1438,7 @@ def validatedit(request):
# print(co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, int(id_poly))
# print(co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, int(id_poly))
with
conn
.
cursor
()
as
buldings
:
with
conn
.
cursor
()
as
buldings
:
buldings
.
execute
(
"""UPDATE geo_bangunan set geom = st_geomfromgeojson('{"type":"MultiPolygon", "coordinates":[
%
s]}'),name='
%
s',information='
%
s',address_1='
%
s', address_2 = '
%
s', address_3 = '
%
s', provinsi='
%
s', gambar = '
%
s', is_deleted = 0, luas_bangunan=
%
s, luas_tanah=
%
s, tinggi_bangunan=
%
s, pemilik='
%
s', type_id = 1, point_id=
%
s, remark='
%
s', db_tipe='
%
s', point_name='
%
s'
WHERE id =
%
s"""
%
(
co_edit
,
name_b
,
info_b
,
desa_b
,
kec_b
,
kab_b
,
pro_b
,
namafile
,
luasb_b
,
luast_b
,
tinggi_b
,
pemilik_b
,
pointopeto
,
rem
,
tdb
,
namapoin
,
int
(
id_poly
)))
buldings
.
execute
(
"""UPDATE geo_bangunan set geom = st_geomfromgeojson('{"type":"MultiPolygon", "coordinates":[
%
s]}'),name='
%
s',information='
%
s',address_1='
%
s', address_2 = '
%
s', address_3 = '
%
s', provinsi='
%
s', gambar = '
%
s', is_deleted = 0, luas_bangunan=
%
s, luas_tanah=
%
s, tinggi_bangunan=
%
s, pemilik='
%
s', type_id = 1, point_id=
%
s, remark='
%
s', db_tipe='
%
s', point_name='
%
s'
, njoptkp=
%
s, njop=
%
s, njkp=
%
s, pbb=
%
s WHERE id =
%
s"""
%
(
co_edit
,
name_b
,
info_b
,
desa_b
,
kec_b
,
kab_b
,
pro_b
,
namafile
,
luasb_b
,
luast_b
,
tinggi_b
,
pemilik_b
,
pointopeto
,
rem
,
tdb
,
namapoin
,
int
(
njoptkp
),
int
(
njop
),
int
(
njkp
),
int
(
pbb
)
,
int
(
id_poly
)))
conn
.
commit
()
conn
.
commit
()
data
=
'SUCCESS'
data
=
'SUCCESS'
...
...
static/js/scripts_js_m.js
View file @
c8c11979
This diff is collapsed.
Click to expand it.
static/js/scripts_js_o.js
View file @
c8c11979
...
@@ -1498,50 +1498,50 @@ function x() {
...
@@ -1498,50 +1498,50 @@ function x() {
}
}
function
georumah
()
{
function
georumah
()
{
loaderPage
(
true
)
//
loaderPage(true)
var
checkBox
=
document
.
getElementById
(
"
geo_building
"
);
var
checkBox
=
document
.
getElementById
(
"
geo_building
"
);
if
(
checkBox
.
checked
==
true
)
{
if
(
checkBox
.
checked
==
true
)
{
console
.
log
(
markerList
.
length
)
console
.
log
(
markerList
.
length
)
if
(
markerList
.
length
==
0
)
{
//
if (markerList.length == 0) {
$
.
ajax
({
//
$.ajax({
url
:
"
api/pointBangunan
"
,
//
url: "api/pointBangunan",
dataType
:
'
json
'
,
//
dataType: 'json',
success
:
function
(
response
)
{
//
success: function(response) {
$
(
"
#bangpoints
"
).
html
(
`<script src="static/bangunan.js"></script>`
)
//
$("#bangpoints").html(`<script src="static/bangunan.js"></script>`)
for
(
var
i
=
0
;
i
<
bangunanPoints
.
length
;
i
++
)
{
//
for (var i = 0; i < bangunanPoints.length; i++) {
var
a
=
bangunanPoints
[
i
];
//
var a = bangunanPoints[i];
var
marker
=
L
.
marker
(
L
.
latLng
(
a
[
0
],
a
[
1
]),
{
//
var marker = L.marker(L.latLng(a[0], a[1]), {
icon
:
L
.
divIcon
({
//
icon: L.divIcon({
className
:
'
invisible-marker
'
//
className: 'invisible-marker'
})
//
})
});
//
});
markerList
.
push
(
marker
);
//
markerList.push(marker);
}
//
}
//console.log('start clustering: ' + window.performance.now());
//
//console.log('start clustering: ' + window.performance.now());
markers
.
addLayers
(
markerList
);
//
markers.addLayers(markerList);
map
.
addLayer
(
markers
);
//
map.addLayer(markers);
if
(
map
.
hasLayer
(
markers
))
{
//
if (map.hasLayer(markers)) {
loaderPage
(
false
);
//
loaderPage(false);
}
//
}
}
//
}
});
//
});
}
else
{
//
} else {
markers
.
addLayers
(
markerList
);
//
markers.addLayers(markerList);
map
.
addLayer
(
markers
);
//
map.addLayer(markers);
if
(
map
.
hasLayer
(
markers
))
{
//
if (map.hasLayer(markers)) {
loaderPage
(
false
);
//
loaderPage(false);
}
//
}
}
//
}
$
(
"
.help_bangunan
"
).
html
(
'
Polygon Bangunan dan Line Jalan terlihat pada zoom > 16
'
)
$
(
"
.help_bangunan
"
).
html
(
'
Polygon Bangunan dan Line Jalan terlihat pada zoom > 16
'
)
}
else
{
}
else
{
...
...
templates/maps/perbaikan.html
View file @
c8c11979
...
@@ -376,12 +376,12 @@
...
@@ -376,12 +376,12 @@
<ul
class=
"nav nav-tabs nav-tabs-bottom nav-justified"
>
<ul
class=
"nav nav-tabs nav-tabs-bottom nav-justified"
>
<button
type=
"button"
class=
"close"
onclick=
"destroyWraper()"
>
×
</button>
<button
type=
"button"
class=
"close"
onclick=
"destroyWraper()"
>
×
</button>
<button
class=
"close modalMinimize"
style=
"right: 50px;"
>
<i
class=
'fa fa-minus'
></i>
</button>
<button
class=
"close modalMinimize"
style=
"right: 50px;"
>
<i
class=
'fa fa-minus'
></i>
</button>
<li
class=
"active"
><a
href=
"#left-tab-input-coordinat"
data-toggle=
"tab"
>
Koordinat
</a></li>
<li
class=
"active"
><a
href=
"#left-tab-input-coordinat
-jalan
"
data-toggle=
"tab"
>
Koordinat
</a></li>
<li><a
href=
"#right-tab-input-informasi"
data-toggle=
"tab"
>
Insert Informasi
</a></li>
<li><a
href=
"#right-tab-input-informasi
-jalan
"
data-toggle=
"tab"
>
Insert Informasi
</a></li>
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"tab-pane active"
id=
"left-tab-input-coordinat"
>
<div
class=
"tab-pane active"
id=
"left-tab-input-coordinat
-jalan
"
>
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<input
type=
"text"
class=
"hidden"
id=
"poly_create"
>
<input
type=
"text"
class=
"hidden"
id=
"poly_create"
>
<input
type=
"text"
class=
"hidden"
id=
"id_jalan_perbaikan"
>
<input
type=
"text"
class=
"hidden"
id=
"id_jalan_perbaikan"
>
...
@@ -391,7 +391,7 @@
...
@@ -391,7 +391,7 @@
</div>
</div>
</div>
</div>
<div
class=
"tab-pane"
id=
"right-tab-input-informasi"
>
<div
class=
"tab-pane"
id=
"right-tab-input-informasi
-jalan
"
>
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment