POST
|
I'm using API version 3.22, and I have LODs defined up to level 20 on the map: var lods = [{"level":"4","resolution":9783.93962050256,"scale":3.6978669431820706E7}, {"level":"5","resolution":4891.96981025128,"scale":1.8489334715910353E7}, {"level":"6","resolution":2445.98490512564,"scale":9244667.357955176}, {"level":"7","resolution":1222.99245256282,"scale":4622333.678977588}, {"level":"8","resolution":611.49622628141,"scale":2311166.839488794}, {"level":"9","resolution":305.74811314070485,"scale":1155583.4197443961}, {"level":"10","resolution":152.8740565703525,"scale":577791.7098721985}, {"level":"11","resolution":76.43702828517624,"scale":288895.8549360992}, {"level":"12","resolution":38.21851414258813,"scale":144447.92746804963}, {"level":"13","resolution":19.10925707129406,"scale":72223.9637340248}, {"level":"14","resolution":9.554628535647032,"scale":36111.98186701241}, {"level":"15","resolution":4.777314267823516,"scale":18055.990933506204}, {"level":"16","resolution":2.388657133911758,"scale":9027.995466753102}, {"level":"17","resolution":1.194328566955879,"scale":4513.997733376551}, {"level":"18","resolution":0.5971642834779395,"scale":2256.9988666882755}, {"level":"19","resolution":0.2985821417,"scale":1128.4994331969}, {"level":"20","resolution":0.14929107085,"scale":564.24971659845}]; I have layers in the HTML viewer that reach level 20, but there are others that go up to 19, and I would like to avoid caching these layers to this last level. I have tried adding the resampling = true option when I add the layer, but nothing is displayed at level 20: var options = { id: servicioId + ";", serviceMode: "KVP", resampling: true, //maxScale: 400, /*resourceInfo: resourceInfo, layerInfo: layerInfo,*/ visible: true }; var capaAnadida = new WMTSLayer(urlWMTS, options); I am doing something wrong? Is there any other option? Thanks!!
... View more
04-13-2018
02:51 AM
|
0
|
0
|
661
|
POST
|
Hello, When I add a WFS layer (WFSLayer), it works fine, as well as the update-start and update-end map events. The problem comes when I delete the WFS layer. When I delete the WFS layer with map.removeLayer (WFSLayer), an update-start event is executed without much sense. Then the onUpdateStart and UpdateEnd events of map are not executed (instead extent-change is working fine). With other types of layers it works perfectly, such as WMSLayer, ArcGIS Feature Layer, ArcGIS Dynamic Layer, ... What can be happening? Is it an API bug? Thank you Pau map.on("update-end", function(response){ console.log("update-end"); domUtils.hide(dom.byId("cargandoCapas")); }); map.on("update-start", function(){ console.log("update-start"); domUtils.show(dom.byId("cargandoCapas")); }); .... var capa = map.getLayer(nombreCapa); map.removeLayer(capa);
... View more
12-04-2017
06:19 AM
|
0
|
2
|
806
|
POST
|
The error is in the request because it is not built well. My request is: http://cartoplora.cma.gva.es/geowebcache/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=Ortofoto_ICV&STYLE=_null&FORMAT=image/jpeg&TILEMATRIXSET=EPSG:25830&TILEMATRIX=" + level + "&TILEROW=" + row + "&TILECOL=" + col But when I click on basemap thumbnail basemap request is: http://cartoplora.cma.gva.es/geowebcache/service/wmts The request is like WMS, without parameters, and only one request. I do not know where to define parameters such as name layer ("Ortofoto_ICV" or "MDT_LIDAR"), Tilematrixset,... I think it is not possible. The code is in my first post. I define a array "basemaps" , where I add the Basemap Layers (basemaps.push(...)). Thanks in advance.
... View more
09-10-2014
06:18 AM
|
0
|
0
|
745
|
POST
|
Thanks Tim for the response, I would like to load multiple layers as basemap, and switch between them using the BasemapGallery. It was to avoid doing it manually. Thanks!
... View more
09-10-2014
05:40 AM
|
0
|
1
|
745
|
POST
|
Hi, I'm trying to add a WMTS layer as Basemap, but can not. Is this possible? My code is as follows, and I get error request: var tileInfo = new TileInfo({ "dpi": "96", "format": "image/jpeg", "compressionQuality": 0, "spatialReference": {"wkid": "25830"}, "rows": 256, "cols": 256, "origin": { "x": 400000, "y": 4600000 }, "lods":[{"level": "EPSG:25830:0","scale": 2200000,"resolution": 582.08449750232842}, {"level": "EPSG:25830:1","scale": 1600000,"resolution": 423.33418000169337}, {"level": "EPSG:25830:2","scale": 1000000,"resolution": 264.58386250105838}, {"level": "EPSG:25830:3","scale": 800000,"resolution": 211.66709000084668}, {"level": "EPSG:25830:4","scale": 600000,"resolution": 158.75031750063502}, {"level": "EPSG:25830:5","scale": 500000,"resolution": 132.29193125052919}, {"level": "EPSG:25830:6","scale": 400000,"resolution": 105.83354500042334}, {"level": "EPSG:25830:7","scale": 300000,"resolution": 79.375158750317510}, {"level": "EPSG:25830:8","scale": 250000,"resolution": 66.145965625264594}, {"level": "EPSG:25830:9","scale": 200000,"resolution": 52.916772500211671}, {"level": "EPSG:25830:10","scale": 150000,"resolution": 39.687579375158755}, {"level": "EPSG:25830:11","scale": 125000,"resolution": 33.072982812632297}, {"level": "EPSG:25830:12","scale": 100000,"resolution": 26.458386250105836}, {"level": "EPSG:25830:13","scale": 90000,"resolution": 23.812547625095252}, {"level": "EPSG:25830:14","scale": 80000,"resolution": 21.166709000084669}, {"level": "EPSG:25830:15","scale": 70000,"resolution": 18.520870375074086}, {"level": "EPSG:25830:16","scale": 60000,"resolution": 15.875031750063501}, {"level": "EPSG:25830:17","scale": 50000,"resolution": 13.229193125052918}, {"level": "EPSG:25830:18","scale": 40000,"resolution": 10.583354500042335}, {"level": "EPSG:25830:19","scale": 30000,"resolution": 7.9375158750317505}, {"level": "EPSG:25830:20","scale": 25000,"resolution": 6.6145965625264589}, {"level": "EPSG:25830:21","scale": 20000,"resolution": 5.2916772500211673}, {"level": "EPSG:25830:22","scale": 15000,"resolution": 3.9687579375158752}, {"level": "EPSG:25830:23","scale": 12500,"resolution": 3.3072982812632294}, {"level": "EPSG:25830:24","scale": 10000,"resolution": 2.6458386250105836}, {"level": "EPSG:25830:25","scale": 7500,"resolution": 1.9843789687579376}, {"level": "EPSG:25830:26","scale": 5000,"resolution": 1.322919312505290}, {"level": "EPSG:25830:27","scale": 3000,"resolution": 0.793751587503175}, {"level": "EPSG:25830:28","scale": 2000,"resolution": 0.529167725002117}, {"level": "EPSG:25830:29","scale": 1000,"resolution": 0.264583862501058}, {"level": "EPSG:25830:30","scale": 500,"resolution": 0.132291931250529}] }); var CapaBase = new BasemapLayer({ url: servidor + "geowebcache/service/wmts", type: "WebTiledLayer", tileInfo: tileInfo}); var capaBaseOrto = new Basemap({layers: [CapaBase], id: "Ortofoto", title: "Ortofoto", thumbnailUrl:"images/base_ortofoto.jpg"}); basemaps.push(capaBaseOrto); ... var basemapGallery = new BasemapGallery({ showArcGISBasemaps: false, basemaps: basemaps, map: map }, "basemapGallery"); basemapGallery.startup(); Thanks!
... View more
09-10-2014
04:03 AM
|
0
|
4
|
2449
|
POST
|
Hello, I'm adapting programming to the new website Asynchronous Module Definition (AMD) format, but when I try to define a particular WMS layer type, I have problems. Has anyone done this conversion? The code is as follows: dojo.declare("my.CatastroWMSLayer", DynamicMapServiceLayer, {
constructor: function() {
this.initialExtent = this.fullExtent = new Extent({xmin:xExtMin,ymin:yExtMin,xmax:xExtMax,ymax:yExtMax,spatialReference:{wkid:sistRefVisor}});
this.spatialReference = new SpatialReference({wkid:sistRefVisor});
this.loaded = true;
this.onLoad(this);
},
getImageUrl: function(extent, width, height, callback) {
var params = {
request:"GetMap",
version:"1.1.1",
service:"WMS",
srs: "EPSG:" + extent.spatialReference.wkid,
bbox:extent.xmin + "," + extent.ymin + "," + extent.xmax + "," + extent.ymax,
width: width,
height: height,
layers:"Catastro",
styles: "",
format:"image/png",
transparent:true,
bgcolor:"ffffff",
time:timeCatastro,
exceptions: "application/vnd.ogc.se_xml"
//changing values
};
callback("http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?" + dojo.objectToQuery(params));
}
}); Thanks! Pau Pérez http://cartoweb.cma.gva.es
... View more
06-20-2014
03:49 AM
|
0
|
0
|
680
|
POST
|
I have a temporary workaround for the event that run two times.
var evento;
................
function clickInfo (evt){
console.log("Clicked" + (++clickCount));
if (navigator.userAgent.indexOf('Firefox') !=-1){
evento.remove();
setTimeout(function(){evento = map.on("click", clickInfo);}, 500);
}
}
evento = map.on("click", clickInfo); The website is: http://cartoweb.cma.gva.es/test.html Thanks! Pau Pérez Puigcerver http://cartoweb.cma.gva.es
... View more
05-15-2014
01:48 AM
|
0
|
0
|
579
|
POST
|
I have Windows Vista SP2 and a colleague of mine who has tested the site has had the same error. He has the same verions and operating system. I attach an image how the event fires in one click. Thanks!
... View more
05-14-2014
11:38 PM
|
0
|
0
|
579
|
POST
|
Hi, When I click on map, using API Javascript 3.9 and Firefox 29.0.1, that there is defined a map.on event click, the event fires two times. In Google Chrome 34.0.1847.131 and IE 9.0.8112.16421 works fine (only one click event fires). The test site is located here: http://cartoweb.cma.gva.es/test.html In Firefox, watching the JavaScript Console you can see that the event fires two times. Does anyone know what is going on? Is it a bug of Firefox? of API? Thanks in advance. Pau Pérez Puigcerver http://cartoweb.cma.gva.es
... View more
05-14-2014
04:04 AM
|
0
|
5
|
1041
|
POST
|
Thanks Domenico for the response, I will install SP5 and I test it. I inform you of the results of the test. Regards Pau Pérez Puigcerver Conselleria de Infraestructuras, Territorio y Medio Ambiente http://cartoweb.cma.gva.es
... View more
02-01-2013
02:01 AM
|
0
|
0
|
1120
|
POST
|
Hello, I have the same strange problem. I make a query to a field with number format. The query is this: http://cartoweb.cma.gva.es/arcgis/rest/services/web_biodiversidad/MapServer/35/query?text=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelContains&relationParam=&objectIds=&where=RECINTO%3D89242185&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=&outFields=&f=html but the query returns 50 records with values of RECINTO=89242175 to RECINTO=89242195. This occurs with a 64bit server with ArcGIS Server 10.04 (SP4). I make the same query, with the same filegeodatabase table, but in another 32bit server with ArcGIS Server 10.03 (SP1,SP2,SP3 installed), and the result is as expected. The result is 3 records with RECINTO=89242185. I'm going crazy, because it has no logic. I tried to make various query (like RECINTO>89242174 AND RECINTO<89242176 with no records returned!!), and I test with diferent fields formats (long integer, double,...) with no results. Does anyone know if this is a bug? Thanks. Pau Pérez Puigcerver Conselleria de Infraestructuras, Territorio y Medio Ambiente http://cartoweb.cma.gva.es
... View more
01-29-2013
02:00 AM
|
0
|
0
|
1120
|
POST
|
I attach an image with the error. It error seems to come from the variable CharacterSet. Any library that is missing? The URI is: http://cartoplora.cma.gva.es/proxypage/proxy.ashx?http://www.ign.es/wms-inspire/ign-base?request=GetCapabilities&service=WMS Thanks
... View more
11-22-2012
06:00 AM
|
0
|
0
|
1077
|
POST
|
Thanks geos_rfleet for the reply, There is responses that code ISO-Latin-1 works, but others responses are in other codes, as you say, and do not work well. I modify the code as attached, but the proxy has an error: // Send the request to the server
System.Net.WebResponse serverResponse = null;
try
{
serverResponse = req.GetResponse();
}
catch (System.Net.WebException webExc)
{
response.StatusCode = 500;
response.StatusDescription = webExc.Status.ToString();
response.Write(webExc.Response);
response.End();
return;
}
// Set up the response to the client
if (serverResponse != null) {
response.ContentType = serverResponse.ContentType;
using (Stream byteStream = serverResponse.GetResponseStream())
{
// Text response
if (serverResponse.ContentType.Contains("text") ||
serverResponse.ContentType.Contains("json") ||
serverResponse.ContentType.Contains("xml"))
{
//using (StreamReader sr = new StreamReader(byteStream))
//using (StreamReader sr = new StreamReader(byteStream, Encoding.GetEncoding(28591)))
using (StreamReader sr = new StreamReader(byteStream, Encoding.GetEncoding(serverResponse.CharacterSet)))
{
string strResponse = sr.ReadToEnd();
response.Write(strResponse);
}
}
else
{
// Binary response (image, lyr file, other binary file)
BinaryReader br = new BinaryReader(byteStream);
byte[] outb = br.ReadBytes((int)serverResponse.ContentLength);
br.Close();
// Tell client not to cache the image since it's dynamic
response.CacheControl = "no-cache";
// Send the image to the client
// (Note: if large images/files sent, could modify this to send in chunks)
response.OutputStream.Write(outb, 0, outb.Length);
}
serverResponse.Close();
}
}
response.End();
} I'm not an expert in C#. Thanks
... View more
11-22-2012
03:24 AM
|
0
|
0
|
1077
|
POST
|
I have a solution, The problem was that text was interpreted as UTF8, not as ISO-Latin-1. I edited proxy.ashx: // Set up the response to the client if (serverResponse != null) { response.ContentType = serverResponse.ContentType; using (Stream byteStream = serverResponse.GetResponseStream()) { // Text response if (serverResponse.ContentType.Contains("text") || serverResponse.ContentType.Contains("json") || serverResponse.ContentType.Contains("xml")) { //using (StreamReader sr = new StreamReader(byteStream)) using (StreamReader sr = new StreamReader(byteStream, Encoding.GetEncoding(28591))) { string strResponse = sr.ReadToEnd(); response.Write(strResponse); } } else { // Binary response (image, lyr file, other binary file) BinaryReader br = new BinaryReader(byteStream); byte[] outb = br.ReadBytes((int)serverResponse.ContentLength); br.Close(); // Tell client not to cache the image since it's dynamic response.CacheControl = "no-cache"; // Send the image to the client // (Note: if large images/files sent, could modify this to send in chunks) response.OutputStream.Write(outb, 0, outb.Length); } serverResponse.Close(); } } response.End(); } Pau Pérez Puigcerver -------------------------------------------------------- Prodevelop, Integración de tecnologÃas http://www.prodevelop.es -------------------------------------------------------- Conselleria d'Infraestructures, Territori i Medi Ambient C./ Francisco Cubells, 7 46011 Valencia Email: asistenciagis2_ctv@gva.es http://www.cma.gva.es
... View more
11-22-2012
01:34 AM
|
0
|
0
|
1077
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|