POST
|
Hy guys, i have a question. Is it possible to use the popup mobile for a ArcGISDynamicMapServiceLayer? In the example it works with a webmap and i tryed with infowindow lite but with this i have some error; with infowindow lite the dynamicmapservicelayer don't load. Thanks
... View more
10-09-2013
05:23 AM
|
0
|
3
|
711
|
POST
|
hi jon, thanks for your reply. This is my code: [HTML] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9, IE=10"> <!-- Sets whether a web application runs in full-screen mode. --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <!-- Sets the style of the status bar for a web application. --> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <title>Mobile Gallery</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" /> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css" /> <style type="text/css"> html, body { height: 100%; margin: 0px; padding: 0px; width: 100%; } #mapcontent, #map { width: 100%; height: 100%; padding: 0; position: absolute; z-index: 0;} </style> <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/"></script> <script> dojo.require("esri.map"); dojo.require("esri.layers.ArcGISDynamicMapServiceLayer"); var featureLayerB; var featureLayerA; var map; function init() { map = new esri.Map("map", { center: [12.785, 42.372], zoom: 4, basemap: "streets" }) featureLayerB = new esri.layers.ArcGISDynamicMapServiceLayer("http://www.pcn.minambiente.it/arcgis/rest/services/geologica/MapServer", { visible:false} ); featureLayerA = new esri.layers.ArcGISDynamicMapServiceLayer("http://sgi.isprambiente.it/ArcGIS/rest/services/servizi/elementi_idrografici/MapServer", { visible:false} ); map.addLayer(featureLayerB) map.addLayer(featureLayerA) } function updateLayerVisibility() { var isChecked = $('#checkbox-v-2a').is(':checked'); if(isChecked == true){ featureLayerB.show() } else{ featureLayerB.hide() }; } function updateLayerVisibility_1() { var isChecked = $('#checkbox-v-2b').is(':checked'); if(isChecked == true){ featureLayerA.show() } else{ featureLayerA.hide() }; } dojo.ready(init); </script> </head> <body> <!-- home view --> <div data-role="page" id="home"> <!-- header --> <div data-theme="a" data-role="header" data-position="fixed"> <a href="#toc" data-role="button" data-icon="bars" data-iconpos="notext"></a> <h3>Editing</h3> </div> <!-- content --> <div data-role="content" id="mapcontent"> <div id="map"></div> </div> </div> <!-- layer view --> <div data-role="page" id="toc"> <!-- header --> <div data-theme="a" data-role="header" data-position="fixed"> <a href="#home" data-role="button" data-icon="back" data-iconpos="notext"></a> <h3>Layer</h3> </div> <!-- content --> <div data-role="content"> <form> <fieldset data-role="controlgroup"> <legend>Vertical:</legend> <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a" onClick="updateLayerVisibility()"> </form> <form> <input type="range" id="slider" data-mini="true"> </form> <form> <label for="checkbox-v-2a">Operation Layer 1</label> <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b" onClick="updateLayerVisibility_1()"> <label for="checkbox-v-2b">Operation Layer 2</label> <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c"> <label for="checkbox-v-2c">Operation Layer 3</label> </fieldset> </form> </div> </div> </body> </html> [/HTML] With the debuger of chrome i don't see nothing when i use the slider. Thanks for your interest and help Bye
... View more
10-07-2013
08:42 AM
|
0
|
0
|
394
|
POST
|
hi guys i'm developing a mobile app with jquery mobile and api javascript compact. I create a list of map service with checkbox to show / hide. Now i would like to develop a slider for change transparency but my code don't work This is the code for slider $(document).ready(function(){ $("#slider-id").slider({ value:100, min:0, max:100, step:5, slide : function(evt, ui){ featureLayerB.setOpacity(ui.value/100); } }); }); and my jquery slider: <input type="range" id="slider" data-mini="true"> but don't work. Any idea or any help? Any example? thanks Bye
... View more
10-03-2013
07:06 AM
|
0
|
4
|
1209
|
POST
|
thanks zj, now the map load correctly. The error is in the doble "::" in the sample code. Thanks very much for your help. Bye
... View more
08-20-2013
12:55 PM
|
0
|
0
|
568
|
POST
|
Hi zj, i tried your code but the map don't load, i have a syntax error. Any idea? Thanks
... View more
08-20-2013
12:44 PM
|
0
|
0
|
568
|
POST
|
hi, thanks for replay. I set the code as on example
function init(){
var webmapid = "6eb589248e684df282db5bcd993d1ebe";
esri.arcgis.utils.createMap(webmapid, "map",{
mapOptions: {
extent: new esri.geometry.Extent({
xmin:1577660.2638056062,
ymin::5056615.1691762265,
xmax::1604566.0977619751,
ymax:5120210.7767094625,
spatialReference:{wkid:102100}
})
}
}).then(function(response){
map = response.map;
});
but the map don't load. If i see the chrome's debug tool i have also a one generic error.
... View more
08-20-2013
08:02 AM
|
0
|
0
|
568
|
POST
|
Yes i know. I use your example code with my value of spatial reference this is the code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9, IE=10">
<!-- Sets whether a web application runs in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<!-- Sets the style of the status bar for a web application. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>Mobile Gallery</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css" />
<link rel="stylesheet" href="vendors/appcropolis/app-reset.css" />
<link rel="stylesheet" href="resources/css/custom-buttons.css" />
<style>
html, body {
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
}
.ui-content {
padding: 0 !important;
}
#map {
height: 100%;
width: 100%;
position: absolute;
z-index: 0;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/"></script>
<script>var dojoConfig = { parseOnLoad:true };</script>
<script>
dojo.require("esri.map");
dojo.require("esri.arcgis.utils");
dojo.require("esri.dijit.Legend");
dojo.require("esri.geometry.Extent");
var map;
function init(){
var webmapid = "6eb589248e684df282db5bcd993d1ebe";
esri.arcgis.utils.createMap(webmapid, "map",{
mapOptions: {
extent: new Extent({
xmin:1577660.2638056062,
ymin::5056615.1691762265,
xmax::1604566.0977619751,
ymax:5120210.7767094625,
spatialReference:{wkid:102100}
})
}
}).then(function(response){
map = response.map;
});
}
dojo.ready(init);
</script>
</head>
<body>
<div data-role="page" id="page">
<!-- header -->
<div data-theme="a" data-role="header" data-position="fixed">
<h3>Mappa</h3>
<a href="#featureDialog" data-role="button" data-theme="reset" class="ios black">Layer</a>
</div>
<!-- content -->
<div data-role="content">
<div id="map"></div>
</div>
</div>
<div data-role="page" id="featureDialog">
<div data-role="header" data-position="fixed" data-theme="a">
<h1>Layer</h1>
<a href="#page" data-role="button" data-theme="reset" class="ios black">Mappa</a>
</div>
<form>
<fieldset data-role="controlgroup" data-inset="true">
<legend></legend>
<input type="checkbox" id="checkbox-v-2a" class ="custom" value="0" data-mini="true" onchange="updateOPPLLayerVisibility()">
<label for="checkbox-v-2a">Geologia</label>
<input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b" data-mini="true" onchange="updateOPPLLayerVisibility()">
<label for="checkbox-v-2b">Two</label>
<input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c" data-mini="true">
<label for="checkbox-v-2c">Three</label>
</fieldset>
</form>
</div>
</body>
</html>
but don't work. In your opinion is there any error? Thanks
... View more
08-20-2013
06:43 AM
|
0
|
0
|
568
|
POST
|
hi, thanks for the replay but i try your code but the webmap is not load. Any idea? thanks
... View more
08-20-2013
06:22 AM
|
0
|
0
|
568
|
POST
|
Hi guys, i develop a sample code for mobile with javascript and i load into it a webmap id that is on my arcgis online account. Is it possible to set a custom extent for the webmap? This is my cod
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Applicazione Web jQuery Mobile</title>
<link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js" type="text/javascript"></script>
<script>var dojoConfig = { parseOnLoad:true };</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4compact/"></script>
<script>
dojo.require("esri.map");
dojo.require("esri.arcgis.utils");
dojo.require("esri.dijit.Legend");
var map;
function init(){
var webmapid = "6eb589248e684df282db5bcd993d1ebe";
esri.arcgis.utils.createMap(webmapid, "mapDiv").then(function(response){
map = response.map;
var legend = new esri.dijit.Legend({
map:map,
layerInfos:(esri.arcgis.utils.getLegendLayers(response))
},"legendDiv");
legend.startup();
});
}
dojo.ready(init);
</script>
</head>
<body>
<div data-role="page" id="page">
<div data-role="header">
<h1>Pagina uno</h1>
</div>
<div data-role="content">
<div id="mapDiv" style="height:380px"></div>
</div>
<div data-role="footer" data-position="fixed">
<h4>Piè di pagina</h4>
</div>
</div>
</body>
</html>
Any help please? Thanks
... View more
08-20-2013
04:18 AM
|
0
|
10
|
1373
|
POST
|
Thanks Jeff i try it. Hello Jeff, I wrote these lines of code and in this way can turn on the single layer with mode_ondemand but does not work the function off to hide it. [HTML] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9, IE=10"> <!-- Sets whether a web application runs in full-screen mode. --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <!-- Sets the style of the status bar for a web application. --> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <title>Mobile Gallery</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" /> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css" /> <style type="text/css"> html, body { height: 100%; margin: 0px; padding: 0px; width: 100%; } #mapcontent, #map { width: 100%; height: 100%; padding: 0; position: absolute; z-index: 0;} </style> <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/"></script> <script> dojo.require("esri.map"); dojo.require("esri.layers.FeatureLayer"); var map; function init() { map = new esri.Map("map", { center: [12.785, 42.372], zoom: 4, basemap: "streets" }); } function initUphamOne() //Name of the function { featureLayerB = new esri.layers.FeatureLayer("http://save.gisaction.org/ArcGIS/rest/services/ABBANDONI/MapServer/0", { mode: esri.layers.FeatureLayer.MODE_ONDEMAND, outFields: ["*"], }); map.addLayer(featureLayerB); } dojo.ready(init); </script> </head> <body> //home view <div data-role="page" id="home"> <!-- header --> <div data-theme="a" data-role="header" data-position="fixed"> <a href="#toc" data-role="button" data-icon="bars" data-iconpos="notext"></a> <h3>Editing</h3> </div> <!-- content --> <div data-role="content" id="mapcontent"> <div id="map"></div> </div> </div> //layer view <div data-role="page" id="toc"> <!-- header --> <div data-theme="a" data-role="header" data-position="fixed"> <a href="#home" data-role="button" data-icon="back" data-iconpos="notext"></a> <h3>Layer</h3> </div> <!-- content --> <div data-role="content"> <form> <fieldset data-role="controlgroup"> <legend>Vertical:</legend> <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a" onClick="initUphamOne()"> <label for="checkbox-v-2a">Operation Layer 1</label> <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b"> <label for="checkbox-v-2b">Operation Layer 2</label> <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c"> <label for="checkbox-v-2c">Operation Layer 3</label> </fieldset> </form> </div> </div> </body> </html> [/HTML] I need to create a function off? If i create a function for hide, example function hideElseB() { featureLayerB.hide(); } any help? thanks
... View more
07-24-2013
08:26 AM
|
0
|
0
|
675
|
POST
|
Create a list of layers with HTML. For each layer there should be a checkbox (input element) and an associated label Add a data-layerid attribute to the checkbox with the id of the associated layer. (You can call this attribute whatever you want as long as it starts with data-) Create a single event handler function for the checkboxes' click events. This function will do the following: Get the layer ID from the data-layerid attribute of the checkbox that was clicked. (The specific checkbox can be accessed in the function via the this keyword.) Retrieve the associated layer from the map using the layer id. Either show or hide the layer, depending on if the checkbox is checked or not. Add the event handler to the checkboxes. If you don't have to worry about supporting old versions of IE, use addEventListener If you need to support old versions of IE, use jQuery's event handling code (i think it's called .click()) Thanks Jeff i try it.
... View more
07-24-2013
04:25 AM
|
0
|
0
|
675
|
POST
|
If you're looking to turn off a single layer within the map service, take a look at nliu's Table of Contents(TOC)/Legend Widget. thanks guys for the answer. I saw these examples but I'm trying to create a layer list for mobile with jquery mobile and using these examples is changed the style of my check box. I'm a flex developer and i'm new of javascript world. Is there any example for layer list in mobile device? Thanks
... View more
07-23-2013
07:56 AM
|
0
|
0
|
675
|
POST
|
Hi, there is any example that show how to turn on off for a single dynamicMapService (ex. http://server/arcgis/rest/root/mapservice/1) with a checkbox? thanks all
... View more
07-23-2013
01:53 AM
|
0
|
7
|
1465
|
POST
|
Thanks Svakil, now the app works. But it work if i run the app by the site. I tried to develop the app with phonegap builder and when i instal the apk on my tablet the layout is not the same thet i see in my mobile when i run the app by the site. The layout of app is a white page with the title of app on he left. Why? Thanks for your reply
... View more
06-04-2013
02:34 AM
|
0
|
0
|
180
|
POST
|
hello guys, I'm developing a mobile application using jquery mobile api javascript esri for the mapping. I created a view where a recall my Webmap published on arcgis online. Now I have created a listview where each element corresponds to one of the points in the Webmap I posted. Can you tell me a method or an instance already developed to click on an item in my listview and zoom to on the feature on my Webmap? thank you very much Any help is welcome goodbye and thank you
... View more
05-23-2013
07:32 AM
|
0
|
0
|
249
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|