Commit 5a8d85e8 authored by Manggar Mahardhika's avatar Manggar Mahardhika

suk

parent b489e4bd
This diff is collapsed.
......@@ -80,10 +80,10 @@ WSGI_APPLICATION = 'OKU.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'OKUPROJECT',
'NAME': 'oku_gis_new',
'USER': 'postgres',
'PASSWORD' : 'owel1234',
'HOST': 'localhost',
'PASSWORD' : 'khansia215758',
'HOST': '30.10.20.102',
'PORT': '5432',
}
}
......
This diff is collapsed.
This diff is collapsed.
var map = L.map('map', { editable: true, zoomControl: false, drawControl: true }).setView([-4.028349, 104.007235], 10);
var map = L.map('map', { editable: true, zoomControl: false, drawControl: true }).setView([-4.125826277307029, 104.1881561279297], 10);
var pool = [];
......@@ -21,14 +21,12 @@ function loaderPage(stat) {
$("#sidebar").hide()
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map);
OpenStreetMap.onclick = function() {
// https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
// https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoib3dlbCIsImEiOiJja2VsNjNxY3AwNng1MzNvOWs0N2U5aXA3In0.kobQj6R5JdlgV78glqjL2Q
maps = L.tileLayer("https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}", {
attribution: "Data by \u0026copy; \u003ca href=\"http://openstreetmap.org\"\u003eOpenStreetMap\u003c/a\u003e",
maxZoom: 22,
......@@ -38,7 +36,7 @@ OpenStreetMap.onclick = function() {
WorldImagery.onclick = function() {
maps = L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {
maps = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "Data by \u0026copy; \u003ca href=\"http://openstreetmap.org\"\u003eESRI\u003c/a\u003e",
maxZoom: 22,
minZoom: 3,
......@@ -66,20 +64,19 @@ var Marker = {};
var Poly = {};
var request = new XMLHttpRequest();
request.open("GET", "../static/bataskota.json", false);
request.open("GET", "../static/batas.json", false);
request.send(null)
var json_batas_kota = JSON.parse(request.responseText);
console.log(json_batas_kota);
var batas = JSON.parse(request.responseText);
console.log(batas);
var geo_batas = L.geoJson(null, {
var geo_batas = L.geoJson(batas, {
style: function(feature) {
return {
color: "#fcba03",
weight: 5,
opacity: 2,
fillcolor: "#fcba03",
fillOpacity: 0
color: "#000000",
weight: 1,
opacity: 1,
fillcolor: "#FFFFFF",
fillOpacity: 0.1
};
},
onEachFeature: function(feature, layer) {
......@@ -87,7 +84,7 @@ var geo_batas = L.geoJson(null, {
mouseover: function(e) {
var layer = e.target;
layer.setStyle({
weight: 5,
weight: 1,
Color: "#067800",
fillColor: "#067800",
......@@ -105,21 +102,6 @@ var geo_batas = L.geoJson(null, {
}
}).addTo(map);
function geo_json_batas(data) {
geo_batas.addData(data)
}
let list_bts = [];
for (var i = 0; i < json_batas_kota.length; i++) {
geoj = json_batas_kota[i];
list_bts.push(geoj);
};
geo_json_batas(list_bts);
map.on(L.Draw.Event.CREATED, function(e) {
var layer = e.layer;
......@@ -212,18 +194,9 @@ $("#closeR").click(function() {
map.off('click', cheakDFeas);
});
// $('#GetAddress').click(function() {
var searchControl = L.esri.Geocoding.geosearch().addTo(map);
// create an empty layer group to store the results and add it to the map
var results = L.layerGroup().addTo(map);
// listen for the results event and add every result to the map
searchControl.on("results", function(data) {
results.clearLayers();
for (var i = data.results.length - 1; i >= 0; i--) {
results.addLayer(L.marker(data.results[i].latlng));
}
});
$('#GetAddress').click(function() {
$("#AddressModal").modal("show");
......@@ -374,7 +347,8 @@ var geo_build_gen = L.geoJson(null, {
geo_build_gen.resetStyle(e.target);
}
});
var content = `<div class="tabbable">
var content = `
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li class="active text-primary" id="feature-title"><a href="#left-tab1-feas-upl" data-toggle="tab" id="info">Information</a></li>
<li><a href="#right-tab2-feas-upl" data-toggle="tab" id="edit">Edit Buildings</a></li>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment