POST
|
I try this (code bellow) to get the same patial reference and use the same LODs. But get error - TypeError: a.equals is not a function[Подробнее] 3.25:577:318 _convertGeometry https://js.arcgis.com/3.25/:577:318 _extentUtil https://js.arcgis.com/3.25/:590:113 constructor https://js.arcgis.com/3.25/:566:101 c/< https://js.arcgis.com/3.25/:200:83 <анонимная> http://localhost:63342/cherkassy05102018/index3.html:71:23 ja https://js.arcgis.com/3.25/:28:254 ha/< https://js.arcgis.com/3.25/:29:8 ka https://js.arcgis.com/3.25/:28:378 ha https://js.arcgis.com/3.25/:28:453 q https://js.arcgis.com/3.25/:31:179 g.injectUrl/g< https://js.arcgis.com/3.25/:35:419 var initialExtent = new Extent({
"xmin": -7775.523464807349,
"ymin": -2343.962606496798,
"xmax": 1825.6498743763282,
"ymax": 3586.173867704885,
"spatialReference": {
"wkid": 4326
}
});
map = new Map("map", {
extent: initialExtent,
basemap: "customBasemap1",
center: [37.15, 48.18],
zoom: 12
});
... View more
10-08-2018
07:36 AM
|
0
|
1
|
252
|
POST
|
I think that my basemaps that customs from the services have same spatial reference and use the same LODs. Maybe it is needs to remove all default baseMaps and it cause some conflict? Can this affects the fact that when loads on both maps only one basemap show?
... View more
10-08-2018
06:12 AM
|
0
|
3
|
252
|
POST
|
for the 1 question map2.on("zoom-end", function (evt) {
map2.setExtent(evt.extent)
}); works fine but the other one need solution...
... View more
10-08-2018
04:51 AM
|
0
|
0
|
693
|
POST
|
Robert, I have got links that needed, thank you for advice... and It started work, but with them came problems 1. with sync zoom at different windows - map.setZoom(evt.target.__LOD.level); dont work...as at this topic Setting initial extent sets to closest zoom level in basemap
2.when first document loading it is not set different maps (my custom basemaps) at different maps but toogle works correctly.
Have you any ideas how fix it? Also can you advice me some useful recources to grow me knowledges (except js api for arcgis)
... View more
10-08-2018
04:38 AM
|
0
|
1
|
693
|
POST
|
http://ags-pro.ecomm.pp.ua/portal/home/webmap/viewer.html?webmap=97459e60f61d4f3eb9c27127f42fd67d is it right link? sorry i am not good yet at differences between them (my gis colleags says it is right link but it not work and cant understand where problem at code or at link)..
... View more
10-05-2018
06:22 AM
|
0
|
9
|
693
|
POST
|
http://mirnograd.ecomm-services.net/portal/apps/webappviewer/index.html?id=34056ac2bbae41b78547daf7f0736c5e i tied this link and it is the same effect...
... View more
10-05-2018
06:02 AM
|
0
|
11
|
693
|
POST
|
Hi, I have such code. Need to show only custom basemaps (that published as services) at 2 different frames with sync effect. Why It doesn't work, how fix it?
<script>
var map, map2;
require(["esri/map", "dojo/on", "esri/dijit/Basemap",
"esri/dijit/BasemapGallery", "esri/dijit/BasemapLayer", "esri/arcgis/utils", "dojo/parser",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane", "dojo/domReady!"],
function (Map, on, Basemap, BasemapGallery, BasemapLayer, arcgisUtils, parser) {
parser.parse();
var basemaps = [];
var customBasemapLayer1 = new BasemapLayer({
url: "http://ags-pro.ecomm.pp.ua/portal/apps/webappviewer/index.html?id=6e5ced0707fd44219eb95209680784d9"
});
var customBasemapLayer2 = new BasemapLayer({
url: "http://ags-pro.ecomm.pp.ua/portal/apps/webappviewer/index.html?id=6e5ced0707fd44219eb95209680784d9"
});
var customBasemap1 = new Basemap({
layers: [customBasemapLayer1],
title: "custom Basemap1",
thumbnailUrl: "custom.png"
});
var customBasemap2 = new Basemap({
layers: [customBasemapLayer2],
title: "custom Basemap2",
thumbnailUrl: "custom.png"
});
basemaps.push(customBasemap1);
basemaps.push(customBasemap2);
map = new Map("map", {
basemap: "customBasemap1", //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
center: [37.15, 48.18,], // longitude, latitude
zoom: 12
});
map2 = new Map("map2", {
basemap: "customBasemap2", //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
center: [37.15, 48.18,], // longitude, latitude
zoom: 12
});
//add the basemap gallery, in this case we'll display maps from ArcGIS.com including bing maps
var basemapGallery = new BasemapGallery({
showArcGISBasemaps: false,
map: map,
basemaps: basemaps,
}, "basemapGallery");
basemapGallery.startup();
basemapGallery.on("error", function (msg) {
console.log("basemap gallery error: ", msg);
});
var basemapGallery2 = new BasemapGallery({
showArcGISBasemaps: false,
map: map2,
basemaps: basemaps,
}, "basemapGallery2");
basemapGallery2.startup();
basemapGallery2.on("error", function (msg) {
console.log("basemap gallery error: ", msg);
});
//Fires when the zoom is complete.
map.on("zoom-end", function (evt) {
map2.setZoom(evt.target.__LOD.level);
});
map2.on("zoom-end", function (evt) {
map.setZoom(evt.target.__LOD.level);
});
// Fires when a mouse button is pressed down and the user starts to drag the mouse.
map.on("mouse-drag-start", function (evt) {
//The resume() method will cause the listener to be called again.
handler1.resume();
});
map2.on("mouse-drag-start", function (evt) {
handler2.resume();
});
//https://developers.arcgis.com/javascript/3/jsapi/map-amd.html - see docs
/*The pausable() method provides a means for pausing an event listener, while still preserving the listeners order and state.
The pausable() method can be called just like on(). The only difference is the returned signal handler will include pause() and resume() methods.*/
//Fires when the pan is complete.
var handler1 = on.pausable(map, "pan-end", function (evt) {
//The pause() method will cause the listener to not be called when the specified event takes place
handler2.pause();
map2.centerAt(evt.extent.getCenter());
});
var handler2 = on.pausable(map2, "pan-end", function (evt) {
handler1.pause();
map.centerAt(evt.extent.getCenter());
});
});
</script> <body class="claro">
<header>
<div class="toogle" style="position:absolute; left:100px; top:20px; z-Index:999;">
<div data-dojo-type="dijit/TitlePane"
data-dojo-props="title:'Switch Basemap1', open:false">
<div data-dojo-type="dijit/layout/ContentPane"
style="width:380px; height:280px; overflow:auto;">
<div id="basemapGallery"></div>
</div>
</div>
</div>
<div class="toogle" style="position:absolute; right:100px; top:20px; z-Index:999;">
<div data-dojo-type="dijit/TitlePane"
data-dojo-props="title:'Switch Basemap2', open:false">
<div data-dojo-type="dijit/layout/ContentPane"
style="width:380px; height:280px; overflow:auto;">
<div id="basemapGallery2"></div>
</div>
</div>
</div>
</header>
<div class="mapContainer">
<div id="map" class="claro"></div>
<div id="map2" class="claro"></div>
</div>
... View more
10-05-2018
05:47 AM
|
0
|
13
|
1411
|
POST
|
question solved, I put my stuff to onOpne function of widget onOpen: function () {
if (this._userHasPrivilege === true) {
//this.fetchDataByName('GroupFilter');
this._workBeforeCreate();
this.widgetManager.activateWidget(this);
}
if (this.templatePicker) {
this.templatePicker.update();
}
setTimeout(function () {
var query = document.getElementById("dijit_form_ValidationTextBox_0");
query.setAttribute('value', '{00000000-0000-0000-0000-000000000000}')
}, 300);
},
... View more
09-13-2018
12:26 AM
|
0
|
0
|
386
|
POST
|
I have tried such _setPresetValue: function () {
var sw = registry.byId("savePresetValueSwitch");
this._usePresetValues = sw.checked;
query('#dijit_form_ValidationTextBox_0').forEach(function(node){
setTimeout(function(){
var widget = registry.byNode(node.children[0]);
widget.set('value', 1);
}, 300);
}, but i received an error
... View more
09-12-2018
07:50 AM
|
0
|
1
|
384
|
POST
|
How can i set a default attribute value to the field of SmartEditor widget as shown on picture
... View more
09-12-2018
07:03 AM
|
0
|
3
|
557
|
POST
|
Client wants something like it Map Compare | Geofabrik Tools
... View more
08-20-2018
06:43 AM
|
0
|
2
|
323
|
POST
|
Who can tell can I by used JS API realize same-time displaying in several (different basemaps) maps?
... View more
08-20-2018
06:18 AM
|
0
|
4
|
596
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|