this example: https://developers.arcgis.com/javascript/3/samples/widget_swipe/ carries what kind of map file? KML?

2113
7
06-24-2016 06:56 AM
geraldomelo
New Contributor

or type file especify is response.MAP it load in file example: Layer Swipe 

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Geraldo,

  That sample is using a Web Map from AGOL. But you can use the swipe widget on a map that has layers loaded in the normal fashion as well using any other supported layer type.

0 Kudos
geraldomelo
New Contributor

Robert, Thankyou the quick response,

it is possible to use I this example: Layer Swipe and load a file extension: KML, GML, MIF, OOM, ShapeFile or SQL? if possible, how do I do?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Geraldo,

  You can add KML and shapefiles to a web map on AGOL anf then use that web map for the swipe. The JS API also supports KMLLayer. You can look at the JS APIs documentation to see a list of supported layer types:

Layer | API Reference | ArcGIS API for JavaScript 3.17

0 Kudos
geraldomelo
New Contributor

I will try, I will see this documentation, but I'm sure where to change the javascript source code to load kml file, for example.

Can I include my doubts in this post?

sorry for written English, I am Brazilian: My Local: -0.055292, -51.169647

if I can publish on the web for you to see.

Grateful.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Geraldo,

  You should look at the KMLLayer sample:

KML | ArcGIS API for JavaScript 3.17

This shows how to add a kml file using the JS API. Then you would just need to combine the layer swipe sample with the KML layer sample. Or you could just add your KML layer to a web map on AGOL and then just use the Layer Swipe sample.

0 Kudos
geraldomelo
New Contributor

ok, I use this example: Click KML

look Zoom direction map in Brazil > Amapá

I go test other examples..... but I need use this example: Geo with my map KML understand?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Geraldo,

  Sorry it seems like KMLLayer is not supported by the LayerSwipe

0 Kudos