POST
|
Actually this code below gives a good example of what I'm running into. Notice that when moving the swipe it actually moves down. If the screen had a lot more content and had to be scrolled vertically, the swipe widget will move down as well to the middle of the screen: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Layer Swipe</title> <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"> <style> #map { padding:0; margin:0; height:50em; width: 80%; border: 2px solid #a1a1a1; border-radius: 15px; } </style> <script src="//js.arcgis.com/3.13/"></script> <script> require([ "esri/map", "esri/dijit/LayerSwipe", "esri/arcgis/utils", "dojo/_base/array", "dojo/domReady!" ], function( Map, LayerSwipe, arcgisUtils, array ) { var mapDeferred = arcgisUtils.createMap("62702544d70648e593bc05d65180fd64", "map"); mapDeferred.then(function(response){ var id; var map = response.map; var title = "2009 Obesity Rates"; //loop through all the operational layers in the web map //to find the one with the specified title; var layers = response.itemInfo.itemData.operationalLayers; array.some(layers, function(layer){ if(layer.title === title){ id = layer.id; if(layer.featureCollection && layer.featureCollection.layers.length){ id = layer.featureCollection.layers[0].id; } return true; }else{ return false; } }); //get the layer from the map using the id and set it as the swipe layer. if(id){ var swipeLayer = map.getLayer(id); var swipeWidget = new LayerSwipe({ type: "vertical", //Try switching to "scope" or "horizontal" map: map, layers: [swipeLayer] }, "swipeDiv"); swipeWidget.startup(); } }); }); </script> </head> <body> <p>This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test</p> <div id="map" class="map"> <div id="swipeDiv"></div> </div> <p>This is another test</p> </body> </html>
... View more
04-01-2015
11:01 AM
|
0
|
1
|
519
|
POST
|
Hi, Using the LayerSwipe demo: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Layer Swipe</title> <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"> <style> html, body, #map { padding:0; margin:0; height:50em; width: 80%; border: 2px solid #a1a1a1; border-radius: 15px; } </style> <script src="//js.arcgis.com/3.13/"></script> <script> require([ "esri/map", "esri/dijit/LayerSwipe", "esri/arcgis/utils", "dojo/_base/array", "dojo/domReady!" ], function( Map, LayerSwipe, arcgisUtils, array ) { var mapDeferred = arcgisUtils.createMap("62702544d70648e593bc05d65180fd64", "map"); mapDeferred.then(function(response){ var id; var map = response.map; var title = "2009 Obesity Rates"; //loop through all the operational layers in the web map //to find the one with the specified title; var layers = response.itemInfo.itemData.operationalLayers; array.some(layers, function(layer){ if(layer.title === title){ id = layer.id; if(layer.featureCollection && layer.featureCollection.layers.length){ id = layer.featureCollection.layers[0].id; } return true; }else{ return false; } }); //get the layer from the map using the id and set it as the swipe layer. if(id){ var swipeLayer = map.getLayer(id); var swipeWidget = new LayerSwipe({ type: "vertical", //Try switching to "scope" or "horizontal" map: map, layers: [swipeLayer] }, "swipeDiv"); swipeWidget.startup(); } }); }); </script> </head> <body> <div id="map" class="map"> <div id="swipeDiv"></div> </div> <p>This is another test</p> </body> </html>
... View more
04-01-2015
10:58 AM
|
0
|
2
|
519
|
POST
|
I'm trying to user the layerswipe (JS API) widget in a map that is enclosed in a div that is on a page with many map-based divs. For some reason the layer swipe widget does not apply within the div's dimensions and essentially goes full screen. Also if there is content above the map div and below, when you move the swipe widget it disappears from the map. Scrolling down the page you'll find the swipe widget somewhere else. When I apply the same map style to the swipewidget div, it seems to shift the div to the right so that it is not in sync with the map. Just having all kinds of problems with this widget. Any help would be appreciated.
... View more
04-01-2015
07:17 AM
|
0
|
5
|
4613
|
POST
|
I know about the upgrading... will happen later down the road though. My company won't do the upgrade now for various reasons so I have no control on that. Right now I would like to get some service definitions and tiles onto ArcGIS online. ArcMap10.0 connects to the SDE 9.1 just fine. I know 10.1 won't work but 10.0 does. Knowing that, what can I do with ArcMap 10.0 to create tiles and service definitions that can be put onto ArcGIS online?
... View more
04-27-2014
04:05 AM
|
0
|
0
|
282
|
POST
|
Hi, I have spatial data in ArcSDE 9.1 and would like to create a WebMap along with associated tiles, service definitions and features on ArcGIS online. I have ArcMap 10.0 and I can't seem to import into ArcGIS online these data types. I can export into a shape file and try to import that shape file but that's not what I want. Any ideas? Thanks in advanced.
... View more
04-24-2014
10:31 AM
|
0
|
2
|
474
|
POST
|
I'm trying to push map and layer data onto ArcGis Online from ArcMap 9.3 but can't seem to figure it out. I see instructions online but its using version 10 that has the package tool. The only thing I see in ArcMap 9.3 is to add data from ArcGIS Online. However I need to do the opposite. Is there a way to push data from ArcMap 9.3 onto ArcGIS Online?
... View more
03-30-2014
08:16 PM
|
0
|
2
|
812
|
POST
|
Hi, I noticed that the current ArcGIS for Android API doesn't seem to have any GPS capability (well, for 2.1 level 7). Looking at the iOS one, there is a lot of GPS functionality built into the API (e.g. MapView). Is this true, or am I not looking at the right place? If the former, that means I must use Android's built in GPS functionality. -los
... View more
07-20-2011
11:38 AM
|
0
|
4
|
2845
|
POST
|
I haven't been able to figure this one out yet so I put it on hold. I currently don't think this is doable with the existing ESRI apis. Has someone got something similar to work? Appreciate any help. Thanks. -los
... View more
06-16-2011
06:43 AM
|
0
|
0
|
783
|
POST
|
Hi, I have a map view where I add two layers-- a base layer and an aerial layer. The base layer is of type ArcGISTiledMapServiceLayer where as the aerial layer is of type ArcGISDynamicMapServiceLayer. I would like to set the alpha on the aerial layer so that it is essentially transparent to begin with. I also have a slider control where it will affect the aerial layer's alpha value. I can't seem to find anywhere on how to set the alpha value. I'm using Android level 7 (2.1). The only thing I can think of is using Android's own View, which has a "setAlpha", but this is only for level 11 (3.0) and up, which is not even supported officially by Esri. Any ideas? Thanks. -los
... View more
05-09-2011
12:14 PM
|
0
|
4
|
2668
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|