Add KML and/or GPX widgets available?

949
10
Jump to solution
03-05-2013 09:45 AM
AshleyPeters
Occasional Contributor III
All,

I would like to provide widgets for our staff to add KMLs and GPX files to our maps. I have found the currently available widgets for adding KMLs and GPX files, but neither will work for us.

The KML widget available will only pull web-hosted KML files. I need it to open files that are saved on a user's computer.

The GPX widget has not been updated in some time and the sample widget is not operating properly.

Can these capabilities be found in another widget?

Ashley
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Frequent Contributor
Looks like all you need to do is make the following change in the GPXTrackPointReaderWidget.mxml and it works just fine in FV3.1.

   <s:Button id="fileBrowse" click="fileBrowse_clickHandler(event)" 
       skinClass="widgets.Samples.GPXTrackPointReader.folderButtonSkin"/>


Need to delete the section in red as the path is incorrect.

R_

View solution in original post

0 Kudos
10 Replies
RhettZufelt
MVP Frequent Contributor
Looks like all you need to do is make the following change in the GPXTrackPointReaderWidget.mxml and it works just fine in FV3.1.

   <s:Button id="fileBrowse" click="fileBrowse_clickHandler(event)" 
       skinClass="widgets.Samples.GPXTrackPointReader.folderButtonSkin"/>


Need to delete the section in red as the path is incorrect.

R_
0 Kudos
AshleyPeters
Occasional Contributor III
R_,

That didn't resolve the issue. I'm still receiving an error that the GPX file is not valid.

Thoughts?

Ashley
0 Kudos
AshleyPeters
Occasional Contributor III
I tried another file and it worked. I guess the others I tried were corrupted in some way. Thanks R_!
0 Kudos
RhettZufelt
MVP Frequent Contributor
Saw this comment from the author on the download page:

tedrick(June 14, 2011)
Updated with a sample GPX file. Note that the code looks for the xmlns definition to determine which version of gpx to use; if you don't have the xmlns defines, you will get the 'not valid gpx file' error.


Suspect that is the issue you ran into.  Glad you got it working,

R_
0 Kudos
RonaldAndrade
New Contributor
Hi
Can you help?
I have. Zip file posted by Tedrick, but apparently defective.
I'm trying to add a widget to the ArcGIS Viewer for Flex - Application Builder and when I test does not show anything. The ArcGIS Viewer for Flex - Application Builder reads .xml file but it only contains these lines:

<configuration>
**** Read a GPS <title> File </ title>
**** <pointColor> 0xFF0000 </ pointColor>
**** <pointDelayMS> 20 </ pointDelayMS>
</ configuration>

Remove the red part of the file.mxml and still does not function.
Can you give me the file you are working? or
Help me with the steps to run this widget in the application name before or flash builder?
Thanks for your cooperation
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ronald,

   The developer has to have a meta.xml that is setup for the widget in order for their widget to be supported by Application Builder. If you do not see a meta.xml in the zip file then it is not a widget that is supported.
0 Kudos
RonaldAndrade
New Contributor
Ronald,

   The developer has to have a meta.xml that is setup for the widget in order for their widget to be supported by Application Builder. If you do not see a meta.xml in the zip file then it is not a widget that is supported.


thanks for your quick response I'm trying in Flash Builder 4.5
But even I could not make it work. Could help me with a tutorial please, because if you were able to make it work
Thanks again
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ronald,

   Writing the meta.xml has nothing to do with Flash Builder. Here is the documentation on writing a meta.xml:

http://resources.arcgis.com/en/help/flex-viewer/concepts/01m3/01m30000004n000000.htm
0 Kudos
RonaldAndrade
New Contributor
Ronald,

   Writing the meta.xml has nothing to do with Flash Builder. Here is the documentation on writing a meta.xml:

http://resources.arcgis.com/en/help/flex-viewer/concepts/01m3/01m30000004n000000.htm


Thank you very much Robert for your help
Finally got to run the widget gpx
But now I have another problem.
All Files .gpx that I have, the widget tells me that do not work or are not valid
Why?
Thanks again
0 Kudos