Commit d12bc4e5 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

added guide pos

parent e3407ee0
......@@ -140,6 +140,13 @@
"domain": "HELCOM"
};
var guide = {
"position" :[
58.35725,
11.41891
]
};
var domainname = "HELCOM";
reqwest({
......@@ -149,6 +156,7 @@
success: function (forcing) {
var properties = {
"domain" : domainname,
"guide" : guide,
"lang": language,
"langdata": langData,
"forcingmodel": forcingconfig.model,
......@@ -177,6 +185,7 @@
// locationoptions['polygon']['name'] = 'Area';
locationoptions['circle'] = false;
locationoptions['domain'] = domainname;
locationoptions['guide'] = guide;
locationoptions['type'] = type;
locationoptions['subtype'] = subtype;
// locationoptions['outlettype'] = false;
......@@ -186,6 +195,7 @@
this.cardMap[locationid].show();
var periodoptions = {};
periodoptions['domain'] = domainname;
periodoptions['guide'] = guide;
periodoptions['type'] = type;
periodoptions['subtype'] = subtype;
periodoptions['initials'] = initials;
......@@ -194,6 +204,7 @@
this.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, this.lang, map, this.domain, this.forcingmodel, periodoptions);
var oiltypeoptions = {};
oiltypeoptions['domain'] = domainname;
oiltypeoptions['guide'] = guide;
oiltypeoptions['type'] = type;
oiltypeoptions['subtype'] = subtype;
oiltypeoptions['initials'] = initials;
......
......@@ -122,6 +122,7 @@ var STWkit;
var subtype = (options && options.hasOwnProperty('subtype')) ? options.subtype : '';
var initials = (options && options.hasOwnProperty('initials')) ? options.initials : '';
var domain = (options && options.hasOwnProperty('domain')) ? options.domain : '';
var guide = (options && options.hasOwnProperty('guide')) ? options.guide : '';
var showsingle = (options && options.hasOwnProperty('single')) ? options.single : true;
var showmultiple = (options && options.hasOwnProperty('multiple')) ? options.multiple : false;
var showpolygon = (options && options.hasOwnProperty('polygon') && options.polygon.hasOwnProperty('show')) ? options.polygon.show : true;
......@@ -194,6 +195,12 @@ var STWkit;
feature['geometry'] = {};
feature['geometry']['type'] = "Point";
feature['geometry']['coordinates'] = [];
var lat = 56.0;
var lng = 19.0;
if (guide) {
lat = guide[0];
lng = guide[1];
}
feature['geometry']['coordinates'].push(19.0);
feature['geometry']['coordinates'].push(56.0);
geojson["features"].push(feature);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -148,6 +148,7 @@ module STWkit {
var subtype = (options && options.hasOwnProperty('subtype'))?options.subtype:'';
var initials = (options && options.hasOwnProperty('initials'))?options.initials:'';
var domain = (options && options.hasOwnProperty('domain'))?options.domain:'';
var guide = (options && options.hasOwnProperty('guide'))?options.guide:'';
var showsingle = (options && options.hasOwnProperty('single'))?options.single:true;
var showmultiple = (options && options.hasOwnProperty('multiple'))?options.multiple:false;
var showpolygon = (options && options.hasOwnProperty('polygon') && options.polygon.hasOwnProperty('show'))?options.polygon.show:true;
......@@ -220,6 +221,12 @@ module STWkit {
feature['geometry'] = {};
feature['geometry']['type'] = "Point";
feature['geometry']['coordinates'] = [];
var lat = 56.0;
var lng = 19.0;
if (guide) {
lat = guide[0];
lng = guide[1];
}
feature['geometry']['coordinates'].push(19.0);
feature['geometry']['coordinates'].push(56.0);
geojson["features"].push(feature);
......
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