POST
|
Hello Sarah. FYI, I came to the same issue. Now after clicking like a fool when trying to get the point, I realize that the graphic is triggering dbl-click event when you move mouse between two clicks of double click for a few pixels. When you double click the same pixel without move, graphic catches 2 clicks, but after small move, it catches dbl-click. And another specific behaviour for me on Linux. If I double click graphic in Chrome, the graphic triggers two click events, but map triggers dbl-click event. If I double click graphic in Firefox, the graphic triggers two click and the map also. In Firefox the lower layer will not get dbl-click event. I know this will not help you, but IMHO it is good to know. And maybe it's good to add this information into bug description so they will be able to find solution sooner.
... View more
03-03-2015
05:44 AM
|
0
|
0
|
1140
|
POST
|
Now I understand Robert. It worked for me, because I setup the base layer directly using addLayer(). But the scale was not interpreted correctly. If I want to change the scales, I need to request levels change on Map server. Thank you for explanation.
... View more
12-04-2014
01:08 AM
|
0
|
0
|
552
|
POST
|
I have all tiled maps with same levels. But I set to map during instantiating different LODs, that I specified and it works with TiledServiceMapLayer and I am not sure if it displayes images in correct scale. However, the map.getScale() shows me my predefined scale ranges.
... View more
12-03-2014
07:40 AM
|
0
|
0
|
552
|
POST
|
Thank you both guys. This is what I realized during tests with different maps. So if I understood it correctly, the solution is to have my dynamic map in Tiled version also or to setup as default another Tiled map. And additional question please: if I have defined specific LODs for my map and in tiled maps are LODs in slightly different scales, the images returned from server are chosen for my specific scale from ranges for level defined on server? Or to paraphrase, may I define my own scale levels to be displayed on my map if on map server are for maps defined different scale levels? Will it be displayed in my map correctly? And one more time, many thanks for really fast and reliable answer.
... View more
12-03-2014
07:10 AM
|
0
|
3
|
552
|
POST
|
Hello, during implementation of basemapGallery for basemaps switching I came to the issue when some basemaps are not loaded after switch on. I have got 3 maps that have tileInfo and are cached and one that have no tileInfo and it is not cached. When the basemap with no cache is inserted as first into basemapGallery, the others cached maps will not show after switch. Server will not send any images, only OK response for .../MapServer?f=json request. If I put into basemapGallery as first another basemap with tileInfo and cache, then I am able to switch between all basemaps. If I want to have shown as first the basemap with no cache, the workaround is also to put it as last and after map load event select last basemap in basemapGallery. Then also everything is working fine. What is the root cause of this issue please. I've got feeling that it could have something with extent or levels of detail or so, because also zoom buttons are not disabled in that case. How to solve it with no workaround? Where is the fail? Am I doing something wrong or should I add some option in map or layer creation? Many thanks for your answers and help. It could be reproduced even with slightly modified basemapGallery sample code: Basemap Gallery - user-defined items | ArcGIS API for JavaScript <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Display Multiple ArcGIS Online Services</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">
<style>
html, body {
height: 97%;
width: 98%;
margin: 1%;
}
#map {
border: solid 1px #B5BCC7;
padding: 0;
}
#paneHeader {
background: url(images/header.png) repeat-x;
color: white;
border-bottom: solid 1px #B5BCC7;
text-align: center;
height: 30px;
margin: 0;
overflow: hidden;
font-size: 16px;
padding: 8px 5px;
}
#rightPane {
width: 150px;
margin: 0;
padding: 0;
}
</style>
<script>var dojoConfig = {parseOnLoad:true};</script>
<script src="http://js.arcgis.com/3.11/"></script>
<script>
dojo.require("esri.map");
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.dijit.BasemapGallery");
dojo.require("esri.arcgis.utils");
var map;
function init() {
map = new esri.Map("map");
createBasemapGallery();
}
function createBasemapGallery() {
//manually create basemaps to add to basemap gallery
var basemaps = [];
var waterTemplateLayer = new esri.dijit.BasemapLayer({
url:"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/WaterTemplate/LocalGovernmentInfrastructureBasemap/MapServer"
});
var waterBasemap = new esri.dijit.Basemap({
layers :[waterTemplateLayer],
title :"Water Template",
thumbnailUrl:"images/waterThumb.png"
});
basemaps.push(waterBasemap);
var publicSafetyLayer = new esri.dijit.BasemapLayer({
url:"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyBasemap/MapServer"
});
var publicSafetyBasemap = new esri.dijit.Basemap({
layers :[publicSafetyLayer],
title :"Public Safety",
thumbnailUrl:"images/safetyThumb.png"
});
basemaps.push(publicSafetyBasemap);
// no cache and tileInfo map. If I put this as first, the other ones won't work
var dLayer = new esri.dijit.BasemapLayer({
url:"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"
});
var dBasemap = new esri.dijit.Basemap({
layers :[dLayer],
title :"Demographic",
thumbnailUrl:"images/safetyThumb.png"
});
basemaps.push(dBasemap);
var basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps:false,
basemaps :basemaps,
map :map
}, "basemapGallery");
basemapGallery.startup();
dojo.connect(basemapGallery, "onError", function (error) {
console.log(error);
});
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<!--[if IE 7]>
<style>
html, body {
margin: 0;
}
</style>
<![endif]-->
<div data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline', gutters:true"
style="width:100%;height:100%;">
<div id="map"
data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
</div>
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'right'" id="rightPane">
<div data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline', gutters:false"
style="width:100%;height:100%;">
<div id="paneHeader"
data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'top'">
<span>Select Basemap</span>
</div>
<div data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div id="basemapGallery"></div>
</div>
</div>
</div>
</div>
</body>
</html>
... View more
12-03-2014
04:47 AM
|
0
|
6
|
2908
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|