Question

KML Layer esri javascript FME Cloud

  • 21 April 2018
  • 1 reply
  • 3 views

I am trying to load a kml as layer and I am thinking I need to wait for a response before adding the layer, here is the code.

var workspace = "https://production-tgs.fmecloud.com/fmedatastreaming/DataProcessing/Field_Data_ETL_v4_TEST.fmw?_csvfile=%24(FME_SHAREDRESOURCE_SYSTEM)%2Ftemp%2Fupload%2FDataProcessing%2F1802007-020818-JS(TGS_Export_v2).csv&_afe=1234567&_srid=12345&_client=Anadarko&_projectname=test&_date_range=032818&_company_ownership=test&_pl_system=&_pl_subsystem=&_ab_status=y&_dest_coordinate_system=LL-83&_src_coordinate_system=TX83-CF&DestDataset;_OGCKML=C%3A%5CUsers%5CChris%5CDesktop%5CTemp%5Ctest.kml";

parser.parse();

 

// Create the ArcGIS Layer and display on the map //

showLoading();

layer = new KMLLayer( workspace );

map.addLayer( layer, 1000 );

layer.on( "load", function() { hideLoading();

});

I get the error

"File not found. Wrong url or out of memory." in console.

If I run the url in browser for the streaming service the kml comes back.


1 reply

Badge

Hi @garydlester

I assume you got the code from this example:

 

https://playground.fmeserver.com/javascript/data-visualization/google-maps/

Did you try to just replace the workspace variable and to change the center of the map to match your content via the MapOptions object in the example code? By clicking on the Refresh Output button the example should pick up your KML layer.

 

I would also recommend configuring the FME Cloud instance to use a static IP address. I noticed that the google.maps.KmlLayer object can fail if the FME Cloud instance is very new and the DNS entries are not fully propagated yet.

Let us know how this goes!

Reply