POST
|
Memoris is a silver member, so yes, I can. Its justs generally a little longer (french support) The strange thing is that, if I remove bboxSR=null&imageSR=null, the exported image loads well...
... View more
04-06-2012
05:48 AM
|
0
|
0
|
335
|
POST
|
What do you you see if you do this:
console.log(r.geometry.spatialReference);
Does that spatial ref match your map's? Yes, it does perfectly.
... View more
04-05-2012
05:10 AM
|
0
|
0
|
335
|
POST
|
I should have said : "I don't if it is because I use a spatial reference which doesn't have a wkid or if it is anything else..." Of course, I have a spatial reference, but a custom one :
this.sr = new esri.SpatialReference({ "wkt":'PROJCS["NTF_Lambert_Zone_II",GEOGCS["GCS_NTF",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",600000.0],PARAMETER["False_Northing",200000.0],PARAMETER["Central_Meridian",2.3372291667],PARAMETER["Standard_Parallel_1",45.8989188889],PARAMETER["Standard_Parallel_2",47.6960144444],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",46.8],UNIT["Meter",1.0]]'
}); The spatial reference is a copy/paste of the map service definition. My code : Please note that mm is a reference to a MapManager (custom), the member map an esri.Map object. I can't post the whole application (too big!). zoom_query: function(layerName, fieldName, id, scale, outFields){
var query = new esri.tasks.Query();
if (typeof(id) == 'string') id = "'"+id+"'";
query.where = fieldName+" = "+id;
query.returnGeometry = true;
if (outFields !== undefined){
query.outFields = outFields;
}
var thisref = this;
var l = this.mm.getLayerByName(layerName);
if (l == null){
alert("zoom_query->Layer "+layerName+" don't exist");
return;
}
l.queryFeatures(
query,
function(featureSet){
var r = featureSet.features[0];
if (thisref.apv.type == 'Point'){
var zoomLevel = thisref.mm.map.setLevel(thisref.mm.getScaleLevel(thisref.apv.scale));
thisref.mm.map.centerAndZoom(r.geometry, zoomLevel);
}
thisref.mm.showInfoWindow(r);
},
onError
);
}
}
So, I just retrieve a point and zoom on it. The scale level is defined in the basemap, which is not displayed at this time. The failure comes from a dynamic map service. Kind regards, FL
... View more
04-04-2012
12:20 AM
|
0
|
0
|
335
|
POST
|
Hello, I encounter a problem with my application. At startup, I make a query to retrieve a point and I zoom on it. The first image loads correctly (unzoomed), but just after the zoom, the api try to load a new image and I have the following error: Error: Chargement de l'image impossible: http://10.1.0.100/ArcGIS/rest/services/Map_dynamic/MapServer/export?dpi=96&transparent=true&format=png8&bbox=382398.38085919805%2C150171.12439732553%2C382872.5151407999%2C150407.13320267646&bboxSR=null&imageSR=null&size=896%2C446&f=image If I unzoom and zoom on the same point (immediatly), I have the same request, bug bboxSR and imageSR are well-filed : http://10.1.0.100/ArcGIS/rest/services/Map_dynamic/MapServer/export?dpi=96&transparent=true&format=png8&bbox=382398.38085919805%2C150171.12439732553%2C382872.5151407999%2C150407.13320267646&bboxSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22NTF_Lambert_Zone_II%5C%22%2CGEOGCS%5B%5C%22GCS_NTF%5C%22%2CDATUM%5B%5C%22D_NTF%5C%22%2CSPHEROID%5B%5C%22Clarke_1880_IGN%5C%22%2C6378249.2%2C293.46602%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0.0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Lambert_Conformal_Conic%5C%22%5D%2CPARAMETER%5B%5C%22False_Easting%5C%22%2C600000.0%5D%2CPARAMETER%5B%5C%22False_Northing%5C%22%2C200000.0%5D%2CPARAMETER%5B%5C%22Central_Meridian%5C%22%2C2.3372291667%5D%2CPARAMETER%5B%5C%22Standard_Parallel_1%5C%22%2C45.8989188889%5D%2CPARAMETER%5B%5C%22Standard_Parallel_2%5C%22%2C47.6960144444%5D%2CPARAMETER%5B%5C%22Scale_Factor%5C%22%2C1.0%5D%2CPARAMETER%5B%5C%22Latitude_Of_Origin%5C%22%2C46.8%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1.0%5D%5D%22%7D&imageSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22NTF_Lambert_Zone_II%5C%22%2CGEOGCS%5B%5C%22GCS_NTF%5C%22%2CDATUM%5B%5C%22D_NTF%5C%22%2CSPHEROID%5B%5C%22Clarke_1880_IGN%5C%22%2C6378249.2%2C293.46602%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0.0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Lambert_Conformal_Conic%5C%22%5D%2CPARAMETER%5B%5C%22False_Easting%5C%22%2C600000.0%5D%2CPARAMETER%5B%5C%22False_Northing%5C%22%2C200000.0%5D%2CPARAMETER%5B%5C%22Central_Meridian%5C%22%2C2.3372291667%5D%2CPARAMETER%5B%5C%22Standard_Parallel_1%5C%22%2C45.8989188889%5D%2CPARAMETER%5B%5C%22Standard_Parallel_2%5C%22%2C47.6960144444%5D%2CPARAMETER%5B%5C%22Scale_Factor%5C%22%2C1.0%5D%2CPARAMETER%5B%5C%22Latitude_Of_Origin%5C%22%2C46.8%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1.0%5D%5D%22%7D&size=896%2C446&f=image I don't if it is because I use a spatial reference which doesn't have a wkid or anything else... Any ideas? Greetings, FL
... View more
04-03-2012
06:08 AM
|
0
|
7
|
824
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|