Select to view content in your preferred language

excel widget problem

5774
24
07-30-2012 11:28 AM
anjelinaponker
Emerging Contributor
Hi
I,m using Add Excel widget in flex 3, but I have this Error:


1046: Type was not found or was not a compile-time constant: PopUpRenderer.


This is related code for this Error:  private var popUpRenderer:PopUpRenderer = new PopUpRenderer();


What should I do for solving this problem?

Best regards
A.ponker
Tags (2)
0 Kudos
24 Replies
RhettZufelt
MVP Notable Contributor
Anthony,

Once I followed the directions in this post http://forums.arcgis.com/threads/50767-MGRS-Widget-for-Flex-Viewer?p=201105&viewfull=1#post201105 the errors went away.

Is it possible these libs should be included in the AddExcel widget download, or should 3.1 actually be able to find these imports without the respective swc's?

R_
0 Kudos
RhettZufelt
MVP Notable Contributor
George,

Do you have the ability to amend the source code? If so the fix you require to add an excel spreadsheet in decimal degrees to a web Mercator application is as follows:

Add the following import statement:

import com.esri.ags.utils.WebMercatorUtil;

Change the gmapPoint variable as illustrated below:

var long:Number = Number(tempData.getItemAt(i)[longNumb].value);
var lat:Number = Number(tempData.getItemAt(i)[latNumb].value);
// var gmapPoint:MapPoint = new MapPoint(long,lat,new SpatialReference(4326));
var gmapPoint:MapPoint = new MapPoint(long,lat);
gmapPoint = WebMercatorUtil.geographicToWebMercator(gmapPoint) as MapPoint;

Regards

Anthony


Hi Anthony,

the webmercatorutil is a nice feature, wish there was geopraphicToStatePlane utility.  Since there isn't, do you happen to know the "snippet" that one would modify to allow this widget to take in geographic yet display in a map in state plane (WKID=32149)?

Not even sure if this is possible without some major code, but if so, would be a great feature to have.

Anyway, I'm open to suggestions,

R_
0 Kudos
AnthonyGiles
Honored Contributor
Rhett,

You can take the point that is created from the latitude and longitude and use the project function in the geometry service to reproject the point to the coordinate system you require, then add this to the graphic layer:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?inSR=4236...

If you look at how Robert handles this in his shapefile widget by creating an array of geometries from the array of graphics, sending this array to the project function then using the returned array of new geometries to update the geometry of each graphic in the original array. 

Regards

Anthony
0 Kudos
Ayesha_
Emerging Contributor

Hi Anthony,

Decided to update my version of the AddExcel widget into FV3.1 but now it is not able to find a couple imports.

  1.    import com.esri.ags.geod.Ellipsoid; 
  2.    import com.esri.ags.geod.geom.MoreUtils; 

Says these imports are "not found".  I'm using the api build 12/12/12 is there a newer one that I am missing, or does one need to find these imports elsewhere?

Thanks,

R_

HI.............can anyone help me to remove these errors as ags class package is not given in dowloadable link on esri site.....from where i can get these two packages

  1. import com.esri.ags.geod.Ellipsoid; 
  2.    import com.esri.ags.geod.geom.MoreUtils; 

reply plz

0 Kudos
AnthonyGiles
Honored Contributor

​Ayesha,

Those packages will be in the API download not the viewer download, the download should come with the instructions of how to add the packages to the viewer, you will need the same version of the API to the viewer you are using:

ArcGIS API for Flex | ArcGIS for Developers

regards

Anthony

0 Kudos