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
2c448ef9
Commit
2c448ef9
authored
Feb 10, 2022
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ search koordinat
parent
0fe38c34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
1 deletion
+60
-1
templates/layout/layout.html
templates/layout/layout.html
+60
-1
No files found.
templates/layout/layout.html
View file @
2c448ef9
...
@@ -164,6 +164,7 @@
...
@@ -164,6 +164,7 @@
<li><input
type=
"hidden"
value=
"bangunan"
/><a
href=
"#"
><i
class=
"icon-home4 text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Bangunan
</a></li>
<li><input
type=
"hidden"
value=
"bangunan"
/><a
href=
"#"
><i
class=
"icon-home4 text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Bangunan
</a></li>
<li><input
type=
"hidden"
value=
"jalan"
/><a
href=
"#"
><i
class=
"icon-git-branch text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Jalan
</a></li>
<li><input
type=
"hidden"
value=
"jalan"
/><a
href=
"#"
><i
class=
"icon-git-branch text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Jalan
</a></li>
<li><input
type=
"hidden"
value=
"point"
/><a
href=
"#"
><i
class=
"icon-location4 text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Point
</a></li>
<li><input
type=
"hidden"
value=
"point"
/><a
href=
"#"
><i
class=
"icon-location4 text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Point
</a></li>
<li><input
type=
"hidden"
value=
"koordinat"
/><a
href=
"#"
><i
class=
"icon-location4 text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Koordinat
</a></li>
<li><input
type=
"hidden"
value=
"reset"
/><a
href=
"#"
><i
class=
"icon-reset text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Reset
</a></li>
<li><input
type=
"hidden"
value=
"reset"
/><a
href=
"#"
><i
class=
"icon-reset text-muted text-size-base"
style=
"color: #5A9AFB;"
></i>
Reset
</a></li>
</ul>
</ul>
</div>
</div>
...
@@ -449,12 +450,19 @@
...
@@ -449,12 +450,19 @@
dar
=
tes
dar
=
tes
if
(
dar
==
'
Point
'
)
{
if
(
dar
==
'
Point
'
)
{
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#input_search
"
).
attr
(
'
placeholder
'
,
'
Search...
'
)
}
else
if
(
dar
==
'
Bangunan
'
)
{
}
else
if
(
dar
==
'
Bangunan
'
)
{
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-home4 text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-home4 text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#input_search
"
).
attr
(
'
placeholder
'
,
'
Search...
'
)
}
else
if
(
dar
==
'
Jalan
'
)
{
}
else
if
(
dar
==
'
Jalan
'
)
{
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-git-branch text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-git-branch text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#input_search
"
).
attr
(
'
placeholder
'
,
'
Search...
'
)
}
else
if
(
dar
==
'
Koordinat
'
){
$
(
"
#pilihcari
"
).
html
(
'
<i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i>
'
)
$
(
"
#input_search
"
).
attr
(
'
placeholder
'
,
'
-4.04663, 103.915915
'
)
}
else
if
(
dar
==
'
Reset
'
)
{
}
else
if
(
dar
==
'
Reset
'
)
{
$
(
"
#pilihcari
"
).
html
(
''
)
$
(
"
#pilihcari
"
).
html
(
''
)
$
(
"
#input_search
"
).
attr
(
'
placeholder
'
,
'
Search...
'
)
}
}
});
});
...
@@ -533,7 +541,7 @@
...
@@ -533,7 +541,7 @@
var
geocodeService
=
L
.
esri
.
Geocoding
.
geocodeService
();
var
geocodeService
=
L
.
esri
.
Geocoding
.
geocodeService
();
var
geocoderNominatim
=
new
L
.
Control
.
Geocoder
.
Nominatim
();
var
geocoderNominatim
=
new
L
.
Control
.
Geocoder
.
Nominatim
();
var
dapoin
=
[
data
[
0
][
0
][
'
geometry
'
][
'
coordinates
'
][
1
],
data
[
0
][
0
][
'
geometry
'
][
'
coordinates
'
][
0
]]
var
dapoin
=
[
data
[
0
][
0
][
'
geometry
'
][
'
coordinates
'
][
1
],
data
[
0
][
0
][
'
geometry
'
][
'
coordinates
'
][
0
]]
//console.log(data[0]
)
console
.
log
(
dapoin
)
// map.setView([data[0]['geometry']['coordinates'][0][0][0][1], data[0]['geometry']['coordinates'][0][0][0][0]], 19);
// map.setView([data[0]['geometry']['coordinates'][0][0][0][1], data[0]['geometry']['coordinates'][0][0][0][0]], 19);
// var result_point = JSON.parse("" + data + "")
// var result_point = JSON.parse("" + data + "")
// //console.log(result_point)
// //console.log(result_point)
...
@@ -2527,6 +2535,57 @@
...
@@ -2527,6 +2535,57 @@
});
});
}
}
});
});
}
else
if
(
dar
==
'
Koordinat
'
){
var
geocodeService
=
L
.
esri
.
Geocoding
.
geocodeService
();
var
geocoderNominatim
=
new
L
.
Control
.
Geocoder
.
Nominatim
();
var
str
=
$
(
'
#input_search
'
).
val
()
var
dapoin
=
str
.
split
(
'
,
'
).
map
(
Number
);
console
.
log
(
dapoin
)
var
geo_koor
=
L
.
marker
(
dapoin
)
conten
=
`
<div id="bottom-justified-data" style="text-align: center;">
<div >
<div style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0">
<p>
`
+
str
+
`
</p>
</div>
</div>
</div>
`
;
geo_koor
.
bindTooltip
(
conten
,
{
permanent
:
true
,
className
:
"
my-label
"
,
direction
:
'
top
'
,
offset
:
[
0
,
-
25
]
});
geo_koor
.
addTo
(
map
);
map
.
setView
(
dapoin
,
19
);
$
(
document
).
on
(
"
click
"
,
"
#btn_search_spes
"
,
function
()
{
geo_koor
.
remove
();
});
$
(
'
#search_spes li a
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#input_search
'
).
val
(
null
)
tes
=
$
(
this
).
text
();
dar
=
tes
if
(
dar
==
'
Reset
'
)
{
// geo_koor.clearLayers();
geo_koor
.
remove
();
// map.eachLayer((geo_koor) => {
// layer.remove();
// });
}
});
}
}
});
});
...
...
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