Skip to content
Snippets Groups Projects
Commit be9f0af4 authored by Glenn Vorhes's avatar Glenn Vorhes
Browse files

added search feature

parent 40424d97
No related branches found
No related tags found
No related merge requests found
Showing
with 178 additions and 5 deletions
......@@ -161,3 +161,21 @@
z-index: 10;
cursor: ew-resize;
}
.geocoder-el {
position: absolute;
top: 10px;
left: 53px;
background-color: white;
}
.geocoder-el input {
margin-right: 4px;
width: 250px;
}
.geocoder-invalid {
background-color: red;
}
.geocoder-loading {
background: url("loading-horizontal.gif") no-repeat 4px, 3px;
background-size: 48px 13px;
color: rgba(1, 1, 1, 0);
}
......@@ -2,3 +2,4 @@
@import "legend";
@import "ol-popup";
@import "layer-swipe";
@import "geocode";
\ No newline at end of file
.geocoder-el {
position: absolute;
top: 10px;
left: 53px;
background-color: white;
}
.geocoder-el input {
margin-right: 4px;
width: 250px;
}
.geocoder-invalid {
background-color: red;
}
.geocoder-loading {
background: url("loading-horizontal.gif") no-repeat 4px, 3px;
background-size: 48px 13px;
color: rgba(1, 1, 1, 0);
}
.geocoder-el {
position: absolute;
top: 10px;
left: 53px;
background-color: white;
input {
margin-right: 4px;
width: 250px;
}
}
.geocoder-invalid {
background-color: red;
}
.geocoder-loading {
background: url("loading-horizontal.gif") no-repeat 4px, 3px;
//background-position: 4px 3px;
background-size: 48px 13px;
color: rgba(1, 1, 1, 0);
}
\ No newline at end of file
css/loading-horizontal.gif

24.1 KiB

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var quickMap_1 = require("../../olHelpers/quickMap");
var map = quickMap_1.default({ addGeocode: true });
window['map'] = map;
console.log('it works');
//# sourceMappingURL=geocode.js.map
\ No newline at end of file
{"version":3,"file":"geocode.js","sourceRoot":"","sources":["../../../src/_tests/demos/geocode.ts"],"names":[],"mappings":";;AAEA,qDAAgD;AAEhD,IAAI,GAAG,GAAG,kBAAQ,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;AAEvC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AAGpB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\nwindow['map'] = map;\r\n\r\n\r\nconsole.log('it works');\r\n"]}
\ No newline at end of file
......@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var ItsLayerCollection_1 = require("../../collections/ItsLayerCollection");
var LayerLegend_1 = require("../../collections/LayerLegend");
var quickMap_1 = require("../../olHelpers/quickMap");
var map = quickMap_1.default();
var map = quickMap_1.default({ addGeocode: true });
window['map'] = map;
var itsLayerCollection = new ItsLayerCollection_1.default(map);
var layerArray = [
......
{"version":3,"file":"itsMap.js","sourceRoot":"","sources":["../../../src/_tests/demos/itsMap.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAGH,2EAAsE;AACtE,6DAAwD;AACxD,qDAAgD;AAEhD,IAAI,GAAG,GAAG,kBAAQ,EAAE,CAAC;AAErB,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AAEpB,IAAI,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,GAAG,CAAC,CAAC;AAErD,IAAI,UAAU,GAAG;IACb;QACI,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,kBAAkB,CAAC,MAAM;KACnC;CACJ,CAAC;AAEF,IAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAEjE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\n\r\nlet map = quickMap();\r\n\r\nwindow['map'] = map;\r\n\r\nlet itsLayerCollection = new ItsLayerCollection(map);\r\n\r\nlet layerArray = [\r\n {\r\n groupName: 'ITS Inventory Layers',\r\n collapse: false,\r\n addCheck: true,\r\n items: itsLayerCollection.layers\r\n }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n"]}
\ No newline at end of file
{"version":3,"file":"itsMap.js","sourceRoot":"","sources":["../../../src/_tests/demos/itsMap.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAGH,2EAAsE;AACtE,6DAAwD;AACxD,qDAAgD;AAEhD,IAAI,GAAG,GAAG,kBAAQ,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;AAEvC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AAEpB,IAAI,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,GAAG,CAAC,CAAC;AAErD,IAAI,UAAU,GAAG;IACb;QACI,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,kBAAkB,CAAC,MAAM;KACnC;CACJ,CAAC;AAEF,IAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAEjE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\nwindow['map'] = map;\r\n\r\nlet itsLayerCollection = new ItsLayerCollection(map);\r\n\r\nlet layerArray = [\r\n {\r\n groupName: 'ITS Inventory Layers',\r\n collapse: false,\r\n addCheck: true,\r\n items: itsLayerCollection.layers\r\n }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n"]}
\ No newline at end of file
import ol = require('custom-ol');
export declare class Geocode {
private theButton;
private theInput;
private map;
private indicationLayer;
constructor(mapDiv: HTMLDivElement, map: ol.Map);
private reset();
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var $ = require("jquery");
var makeGuid_1 = require("../util/makeGuid");
var ol = require("custom-ol");
var projections_1 = require("./projections");
var invalidClass = 'geocoder-invalid';
var geocoderLoadingClass = 'geocoder-loading';
// let testAddress = '65 7th Street, Prairie du Sac, WI';
var Geocode = (function () {
function Geocode(mapDiv, map) {
var _this = this;
var inputGuid = makeGuid_1.makeGuid();
var buttonGuid = makeGuid_1.makeGuid();
this.map = map;
this.indicationLayer = new ol.layer.Vector({
source: new ol.source.Vector(),
style: new ol.style.Style({
image: new ol.style.Circle({
radius: 12,
fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),
stroke: new ol.style.Stroke({ color: 'red', width: 1 })
})
})
});
this.map.addLayer(this.indicationLayer);
$(mapDiv).append('<div class="geocoder-el">' +
("<input type=\"text\" id=\"" + inputGuid + "\">") +
("<button id=\"" + buttonGuid + "\">Search</button>") +
'</div>');
this.theButton = document.getElementById(buttonGuid);
this.theInput = document.getElementById(inputGuid);
this.reset();
var $theButton = $(this.theButton);
var $theInput = $(this.theInput);
$theButton.click(function () {
$theButton.addClass(geocoderLoadingClass);
_this.theButton.disabled = true;
_this.indicationLayer.getSource().clear();
$.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) {
var lat = parseFloat(d['latt']);
var lon = parseFloat(d['longt']);
if ((lat == 0 && lon == 0) || d['error']) {
$theInput.addClass(invalidClass);
_this.theInput.title = 'Specified Location Invalid';
_this.theButton.title = 'Specified Location Invalid';
}
else {
var v = _this.map.getView();
var p = new ol.geom.Point([lon, lat]);
var feat = new ol.Feature(p);
_this.indicationLayer.getSource().addFeature(feat);
p.transform(projections_1.proj4326, projections_1.proj3857);
v.setCenter(p.getCoordinates());
v.setZoom(13);
}
$theButton.removeClass(geocoderLoadingClass);
_this.theButton.disabled = false;
}, 'json');
});
$(this.theInput).keyup(function (evt) {
_this.theButton.disabled = _this.theInput.value.length == 0;
$theInput.removeClass(invalidClass);
_this.theInput.title = '';
_this.theButton.title = '';
if (!_this.theButton.disabled && evt.keyCode == 13) {
$theButton.click();
}
});
}
Geocode.prototype.reset = function () {
this.theButton.disabled = true;
this.theInput.value = '';
};
return Geocode;
}());
exports.Geocode = Geocode;
//# sourceMappingURL=geocode.js.map
\ No newline at end of file
{"version":3,"file":"geocode.js","sourceRoot":"","sources":["../../src/olHelpers/geocode.ts"],"names":[],"mappings":";;AAAA,0BAA4B;AAC5B,6CAA0C;AAC1C,8BAAiC;AACjC,6CAAiD;AAGjD,IAAI,YAAY,GAAG,kBAAkB,CAAC;AACtC,IAAI,oBAAoB,GAAG,kBAAkB,CAAC;AAE9C,yDAAyD;AAGzD;IAMI,iBAAY,MAAsB,EAAE,GAAW;QAA/C,iBA4EC;QA3EG,IAAI,SAAS,GAAG,mBAAQ,EAAE,CAAC;QAC3B,IAAI,UAAU,GAAG,mBAAQ,EAAE,CAAC;QAE5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,eAAe,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;YACvC,MAAM,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;YAC9B,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;gBACtB,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;oBACvB,MAAM,EAAE,EAAE;oBACV,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,mBAAmB,EAAC,CAAC;oBACrD,MAAM,EAAE,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,KAAI,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC;YAE1B,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChD,UAAU,CAAC,KAAK,EAAE,CAAC;YACvB,CAAC;QACL,CAAC,CAAC,CAAA;IAEN,CAAC;IAEO,uBAAK,GAAb;QACI,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;IAC7B,CAAC;IAQL,cAAC;AAAD,CAAC,AA/FD,IA+FC;AA/FY,0BAAO","sourcesContent":["import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click(() => {\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n"]}
\ No newline at end of file
......@@ -10,6 +10,7 @@ export interface quickMapOptions {
maxZoom?: number;
baseSwitcher?: boolean;
fullScreen?: boolean;
addGeocode?: boolean;
}
/**
* Sets up a map with some default parameters and initializes
......
......@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var provide_1 = require("../util/provide");
var ol = require("custom-ol");
var $ = require("jquery");
var geocode_1 = require("./geocode");
var nm = provide_1.default('olHelpers');
/**
* Sets up a map with some default parameters and initializes
......@@ -30,6 +31,7 @@ function quickMapBase(options) {
options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;
options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;
options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;
options.addGeocode = options.addGeocode || false;
var $mapDiv = $('#' + options.divId);
$mapDiv.css('position', 'relative');
var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
......@@ -84,6 +86,9 @@ function quickMapBase(options) {
if (options.fullScreen) {
map.addControl(new ol.control.FullScreen({}));
}
if (options.addGeocode) {
new geocode_1.Geocode(document.getElementById(options.divId), map);
}
return map;
}
exports.quickMapBase = quickMapBase;
......
This diff is collapsed.
......@@ -2,5 +2,5 @@
* guids are used to uniquely identify groups and features
* @returns {string} a new guid
*/
declare function makeGuid(): string;
export declare function makeGuid(): string;
export default makeGuid;
......@@ -16,6 +16,7 @@ function makeGuid() {
return v.toString(16);
});
}
exports.makeGuid = makeGuid;
nm.makeGuid = makeGuid;
exports.default = makeGuid;
//# sourceMappingURL=makeGuid.js.map
\ No newline at end of file
{"version":3,"file":"makeGuid.js","sourceRoot":"","sources":["../../src/util/makeGuid.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,qCAAgC;AAChC,IAAI,EAAE,GAAG,iBAAO,CAAC,MAAM,CAAC,CAAC;AAGzB;;;GAGG;AACH;IACQ,MAAM,CAAC,sCAAsC;SACxC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;QAEjE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AAEf,CAAC;AACD,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,kBAAe,QAAQ,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n"]}
\ No newline at end of file
{"version":3,"file":"makeGuid.js","sourceRoot":"","sources":["../../src/util/makeGuid.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,qCAAgC;AAChC,IAAI,EAAE,GAAG,iBAAO,CAAC,MAAM,CAAC,CAAC;AAGzB;;;GAGG;AACH;IACQ,MAAM,CAAC,sCAAsC;SACxC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;QAEjE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AAEf,CAAC;AARD,4BAQC;AACD,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,kBAAe,QAAQ,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n"]}
\ No newline at end of file
import ItsLayerCollection from '../../collections/ItsLayerCollection';
import LayerLegend from '../../collections/LayerLegend';
import quickMap from '../../olHelpers/quickMap';
let map = quickMap({addGeocode: true});
window['map'] = map;
console.log('it works');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment