Select to view content in your preferred language

Add Excel Widget uploaded to the Resource Center

4103
38
07-23-2012 10:29 AM
AnthonyGiles
Honored Contributor
All,

Please find a link to an add Excel Widget:

http://www.arcgis.com/home/item.html?id=b8d2f6a9063e44669eddfdd2d32244e8

Thank You Robert for hosting sample application for me

Feedback welcome

Regards

Anthony
0 Kudos
38 Replies
AnthonyGiles
Honored Contributor
Kenneth,

To achieve what you are after would require some sort of geocode server that holds your street names / junction names. What you would have to do then is for every street / junction name entry on your spreadsheet you would have to make a call to the geocode service to see if it has a match and if so return the coordinates so you could plot it on the map.

This is not impossible to do but the hardest thing will be finding a geocode service that suits your requirement (or host your own)

Regards

Anthony
0 Kudos
KennethLyons
Emerging Contributor
I'm having some issues with the excel widget not recognizing the web mercator lat/long that I've inputted.  It's only a couple points so it's not a major issue, but I'm unsure as to why those couple points are not plotting correctly.  I'm attaching a copy of the spreadsheet I'm using for any feed back.

thanks
0 Kudos
AnthonyGiles
Honored Contributor
Kenneth,

I have just uploaded your spreadsheet to the sample site at:

http://gis.calhouncounty.org/FlexViewer2.5/index.html?config=config-addexcel.xml

And I get 67 points, the same that is in your spreadsheet,

How many do you get

Regards

Anthony
0 Kudos
KennethLyons
Emerging Contributor
I'm getting all 67 points as well.  the issue is that there is at least one point that is not plotting correctly.  It's being put in the altantic ocean off the west coast of africa.  not sure what is causing this.  I'm getting it in your test viewer as well.  Just not sure what is causing it so I can correct it.

Thanks for taking a look
0 Kudos
AnthonyGiles
Honored Contributor
Kenneth,

I dont think any points are getting plotted in the place. You have 67 locations and 68 points are being plotted. I think the 68th point is the one getting plotted in the ocean. I suspect this is at 0,0 and what is happening is the for loop that plots the points is doing one to many and it is reading the empty row at the end of the data.  When I get chance I will have a look at the code.

Thanks for pointing this out

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
Have not completely tested it to see if it breaks something else, but this seems to "fix" it.

locateResult.content = "Number of Features: " + (tempData.length - 1).toString();
locateResult.icon = "assets/images/excel.png";
locateResult.layerID = String(layerNumber);
ResultAC.addItem(locateResult);
    
for(var i:int = 0;i<tempData.length;i++)                //change from
for(var i:int = 0;i<(tempData.length - 1);i++)          //change to


Plus it makes it match the count from a few lines above.

R_
0 Kudos
RichardDiaz
Regular Contributor
If you wish to map Decimal Degrees that are in the spreadsheet to a Web Mercator basemap (i.e. Bing), do the following:

  1. Add the reference: import com.esri.ags.utils.WebMercatorUtil;

  2. 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,

Rick
0 Kudos
AnthonyGiles
Honored Contributor
All,

With Roberts help an updated version for use with 3.0 has been uploaded to the resource center.

The update also has a few additions and bug fixes:


[INDENT]�?�Bug fixes for one more graphic being added to the graphics layer with 0,0 coordinates and the first point not having a click handler.
�?�Esri popup used to display attributes.
�?�Ability to specify a link field and alias.
�?�Zoom to extent of features when feature panel clicked [/INDENT]


http://www.arcgis.com/home/item.html?id=b8d2f6a9063e44669eddfdd2d32244e8

Regards

Anthony
0 Kudos
deleted-user-yA_w_FC9FKe5
Deactivated User
All,

With Roberts help an updated version for use with 3.0 has been uploaded to the resource center.

The update also has a few additions and bug fixes:


[INDENT]�?�Bug fixes for one more graphic being added to the graphics layer with 0,0 coordinates and the first point not having a click handler.
�?�Esri popup used to display attributes.
�?�Ability to specify a link field and alias.
�?�Zoom to extent of features when feature panel clicked [/INDENT]


http://www.arcgis.com/home/item.html?id=b8d2f6a9063e44669eddfdd2d32244e8

Regards

Anthony


Has anyone updated this yet?  I am about to roll out a new product and this feature would be great to display using the new 3.3.

If someone has the time could you please post the importexcel for 3,3.  I have a feeling quite a few of you have done this already and it would be greatly appreciated.

Thanks,

Michael
0 Kudos
deleted-user-yA_w_FC9FKe5
Deactivated User
Sorry I thought I would try this one more time.  Has anyone updated the addexcel widget for 3.3 that they care to share. 

I'm not real familiar with how to do this and figured/hoped someone else had already taken the steps to do this.  If you have could you please take a moment to upload it for those of us who are not as experienced please.  This would be a nice widget just to have with the main flex builder.
0 Kudos