Select to view content in your preferred language

Bug? bboxSR=null&imageSR=null

969
7
04-03-2012 06:08 AM
FlorianLeman
Emerging Contributor
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
0 Kudos
7 Replies
derekswingley1
Deactivated User

I don't if it is because I use a spatial reference which doesn't have a wkid or anything else...


Can you elaborate on this? What is your spatial reference if it "doesn't have a wkid or anything else"? Also, please post your code you're using to define your point and zoom the map.
0 Kudos
FlorianLeman
Emerging Contributor
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
0 Kudos
derekswingley1
Deactivated User
What do you you see if you do this:
console.log(r.geometry.spatialReference);


Does that spatial ref match your map's?
0 Kudos
FlorianLeman
Emerging Contributor
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.
0 Kudos
derekswingley1
Deactivated User
This should be working as we do support well-known text for custom spatial references. Are you able to open a call with support?
0 Kudos
FlorianLeman
Emerging Contributor
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...
0 Kudos
derekswingley1
Deactivated User
Do you have a public map service I can use to test? If so, please post some code to repro the issue.
0 Kudos