|
POST
|
Ok, is there a reason I have to use append? Why doesn't it work when I try to do it manually?
... View more
06-20-2014
10:30 AM
|
0
|
0
|
1251
|
|
POST
|
Hi odoe, I'm still a beginner at JavaScript. Can you explain what you mean by "I append a div to the "map_root" element"?
... View more
06-20-2014
09:59 AM
|
0
|
0
|
1251
|
|
POST
|
Has anyone tried this recently? I was able to remove the ESRI logo using logo:false. But when I tried to add in my custom logo manually using CSS and a logo div in the body html using the parameters above, the logo sits in the top right of my page. The logo never moves from this position no matter what numbers I have in the bottom, right, or z-value. Any suggestions? I want it in the lower right of the map where the ESRI logo used to be.
... View more
06-20-2014
09:47 AM
|
0
|
0
|
1418
|
|
POST
|
Thank you danwebb for offering to help! I always feel like most of my threads are ignored around these parts. I tried your way. It's now zooming in to the area that is geocoded, but it's still not showing the point symbol of the area searched. Any other ideas?
... View more
06-17-2014
11:33 AM
|
0
|
0
|
965
|
|
POST
|
Here is the layout.css file if you want to test:
html,body {
height:100%;
width:100%;
padding:0;
margin:0;
overflow:hidden;
}
body {
background-color:#fff;
color:#333;
font-size:14px;
overflow:hidden;
font-family:Georgia, "Times New Roman", Times, serif;
}
a {
color:#555;
font-weight:bold;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
#header {
height:117px;
background:#3e3e3e;
color:#fff;
margin:0;
}
#headerText{
padding-top:20px;
padding-left:25px;
width:70%;
float:left;
min-width:800px;
}
#title {
font-size:30px;
font-weight:bold;
text-align:left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
#subtitle {
font-size:14px;
margin-top:10px;
overflow: hidden;
}
#addressbar{
position:absolute;
padding-top:8px;
right:10px;
}
#logoArea{
float:right;
padding-top:25px;
padding-right:25px;
text-align:right;
}
#social{
bottom: 25px;
right: 15px;
position: absolute;
}
#social2{
bottom: 3px;
right: 42px;
position: absolute;
}
#msLink{
color:#0276FD;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
outline:none;
}
#msLink1{
color:#0276FD;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
outline:none;
}
#Mdplogo{
right: 20px;
bottom:25px;
position:absolute;
z-index:100;
height:30px;
border:none;
}
#logoImg{
border:none;
outline:none;
}
#map {
margin:0;
}
#swipeImg{
display:none;
position:absolute;
z-index:2;
}
.moveable {
position:absolute;
border-left:1px solid #848484;
border-right:1px solid #848484;
background-color: #cdcdcd;
width: 6px;
height: 100%;
padding: 0 !important;
margin: 0;
z-index: 30;
cursor: col-resize;
}
.moveable:hover {
background-color:#999;
}
#footer {
display:none;
font-size:12px;
background:#848484;
height:18px;
margin:0;
padding:10px 15px 5px;
}
.map .bingLogo-lg {
left:18px !important;
}
#legendCon{
position:absolute;
width:300px !important;
margin-left:100px;
z-index:100;
}
#legendDiv{
display:none;
background:#848484;
max-height:450px;
overflow:auto;
padding:10px;
font-family:Arial, Helvetica, sans-serif;
}
#legendToggle{
position:relative;
background:#848484;
margin-top:-1px;
width:125px;
.height:28px;
cursor:pointer;
z-index:100;
color:#fff;
font-family:Arial, Helvetica, sans-serif;
}
#legTogText{
position:relative;
margin:auto;
margin-left:2px;
.margin-top:0px;
padding:5px;
color:#fff;
font-family:Arial, Helvetica, sans-serif;
}
g,v {
cursor:pointer;
}
#loadingCon{
position:absolute;
z-index:99;
width:100%;
top:40%;
text-align:center;
}
#loadingDialog{
margin:auto;
background-color:#dadada;
width:300px
}
#loadingHeader{
background-color:#444;
color:#fff;
padding-top:10px;
padding-bottom:10px;
width:300px;
}
#loading{
padding-top:10px;
}
#loadingImg{
margin-top:5px;
padding-bottom:10px;
}
... View more
06-17-2014
08:14 AM
|
0
|
0
|
965
|
|
POST
|
Hi, can someone please help me? I'm following the tutorial here: https://developers.arcgis.com/javascript/jstutorials/tutorial_geocoder.html I just want to add a point symbol and zoom in for the address that has been geocoded, but the code given on the website is not working. Everything works except they point symbol is not showing up. Anyone know what is wrong with my code? I tried to use Picture Symbol vs Simple Marker symbol, with no results. The code works (showing base map with working geocoder, scale, and legend) if I take out the code for adding a point. When I leave in the code to add in a point, nothing displays on the web page other than the title border. Thanks. Here is a sample of my code:
<head>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<link rel="stylesheet" href="css/layout.css">
<style>
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 75px;
}
</style>
<script src="http://js.arcgis.com/3.9/"></script>
<script>
//define variables
var geocoder;
//call widgets
require([
"dojo/parser",
"dojo/ready",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dojo/dom",
"esri/map",
"esri/urlUtils",
"esri/arcgis/utils",
"esri/dijit/Legend",
"esri/dijit/Scalebar",
"esri/dijit/Geocoder",
"esri/graphic",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/PictureMarkerSymbol",
"esri/geometry/screenUtils",
//"dojo/dom",
"dojo/dom-construct",
"dojo/query",
"dojo/_base/Color",
"dojo/domReady!"
], function(
parser,
ready,
BorderContainer,
ContentPane,
dom,
Map,
urlUtils,
arcgisUtils,
Legend,
Scalebar,
Geocoder,
Graphic,
SimpleMarkerSymbol,
PictureMarkerSymbol,
screenUtils,
//dom,
domConstruct,
query,
Color
) {
//create a map and instance of geocoder and other widgets here
ready(function(){
parser.parse();
arcgisUtils.createMap("**WEB map id here**","mapDiv").then(function(response){
//update the app
dom.byId("title").innerHTML = response.itemInfo.item.title;
dom.byId("subtitle").innerHTML = response.itemInfo.item.snippet;
var actualmap = response.map;
//add the scalebar
var scalebar = new Scalebar({
map: actualmap,
scalebarUnit: "english"
});
//add the legend. Note that we use the utility method getLegendLayers to get
//the layers to display in the legend from the createMap response.
var legendLayers = arcgisUtils.getLegendLayers(response);
var legendDijit = new Legend({
map: actualmap,
layerInfos: legendLayers
},"legend");
legendDijit.startup();
//geocoder
geocoder = new Geocoder({
map: actualmap,
autoComplete: true,
arcgisGeocoder: false,
geocoders: [{
"name": "geocoder name",
"url": "*geocoder url here*",
"countryCode":"USA",
"currentExtent":false,
"placeholder": "Search",
"singleLineFieldName":"SingleLine"
}],
},"search");
geocoder.startup();
geocoder.focus();
//show results of geocoder on map *CODE copied from ArcGIS Tutorial to add point****
geocoder.on("select", showLocation);
function showLocation(evt) {
map.graphics.clear();
var point = evt.result.feature.geometry;
var symbol = new SimpleMarkerSymbol()
.setStyle("square")
.setColor(new Color([255,0,0,0.5]));
var graphic = new Graphic(point, symbol);
map.graphics.add(graphic);
});
});
});
});
</script>
</head>
<body class="claro">
<div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'" style="width:100%; height:100%;">
<div id="header" class="shadow roundedCorners" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
<div id="title"></div>
<div id="subtitle"></div>
</div>
<div id="mapDiv" class="roundedCorners shadow" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
<div id="search"></div>
</div>
<div id="rightPane" class="roundedCorners shadow" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'" >
<div id="legend"></div>
</div>
</div>
</body>
</html>
... View more
06-17-2014
04:39 AM
|
0
|
6
|
1583
|
|
POST
|
More about the error I'm getting in IE 9. It sends me to this page: http://utility.arcgisonline.com/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/_ags_9553e045d6ac41cb9ffdbc7710db5098.png Anyone know why it is doing this?
... View more
06-03-2014
11:21 AM
|
0
|
0
|
440
|
|
POST
|
For changing the layout, have you tired looking into the layout.js file in the javascript folder?
... View more
06-03-2014
07:43 AM
|
0
|
0
|
743
|
|
POST
|
Hi, I'm currently having an issue with the Print Widget in my downloaded web app. First, the print widget freezes after being clicked in Chrome 35 and firefox 29. In IE 9, I get this error about "proxy.ashx?http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute status: 500". I'm assuming something is wrong with PrintTask then? Current code for printing related functions: displayprint: !(environment.TouchEnabled),
printtask: "http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",
//printtask: "http://staging.geodata.md.gov/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",
//Set the label in the nls file for your browsers language
printlayouts: [{
layout: 'Letter ANSI A Landscape',
label: 'Landscape - PDF',//i18n.tools.print.layouts.label1,
format: 'PDF'
}, {
layout: 'Letter ANSI A Portrait',
label: 'Portrait - PDF',//i18n.tools.print.layouts.label2,
format: 'PDF'
}, {
layout: 'Letter ANSI A Landscape',
label: 'Landscape - PNG',//i18n.tools.print.layouts.label3,
format: 'PNG32'
}, {
layout: 'Letter ANSI A Portrait',
label: 'Portrait - PNG',//i18n.tools.print.layouts.label4,
format: 'PNG32'
}],
if (response.values.displayprint != undefined) {
configOptions.displayprint = response.values.displayprint;
How can I get the print button to work? Thanks.
... View more
06-03-2014
07:03 AM
|
0
|
1
|
806
|
|
POST
|
Hello again, I downloaded a web app template to my computer based on a map I created in ArcGIS online. On the ArcGIS Online version, I have the ability to press a drop down menu and pick from 3 geolocoders to find an address. However, when I view the map in a browser based on the code I downloaded from the ESRI github, this option goes away. Only one geocoder shows. It's either the default geocoder, or the geocoder I put in the placefinder code found here on the index.html page: placefinder: {
"url": "geocoding service link here",
"countryCode":"USA",
"currentExtent":false,
"placeholder": "Search",
"singleLineFieldName":"SingleLine"
}, "Placefinder" is accessed by the external layout.js page in function that determines whether to use the default geocoder or geocoder listed in the url under placefinder. Is there a way to put the pick from 3 geocoders in a list functionality back into my javascript or html page by manipulating the index.html or layout.js pages? Has anyone tried this before? Thanks.
... View more
05-30-2014
12:18 PM
|
0
|
0
|
664
|
|
POST
|
I was able to get it to work. I just started over as suggested by a thread below. I deleted everything and downloaded the code again, and it now works. Weird.
... View more
05-29-2014
09:14 AM
|
0
|
0
|
489
|
|
POST
|
the rest of the code here:
<body class="claro">
<div id="bc" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline', gutters:false"
style="width:100%; height:100%;padding:0;">
<!-- Header Section-->
<div id="header" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
<!--Title dyanmically generated -->
<div id="nav" style='display:none;'>
<!-- links are dynamically generated-->
<ul>
<li id="link1List"></li>
<li>|</li>
<li id="link2List"></li>
</ul>
</div>
</div>
<!--End Header-->
<!-- Main Content Section (map, toolbars, left panel)-->
<div id="mainWindow" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"
style="width:100%;height:100%;">
<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false"
style="width:100%;height:100%;padding:0;">
<!-- Toolbar (Search Basemap Measure)-->
<div id="toolbarContainer_bv" data-dojo-type="dijit.layout.ContentPane" data-dojo-props='region:"top"'>
<div data-dojo-type="dijit.Toolbar">
<div id="webmap-toolbar-left">
<!--Toolbar buttons (Legend, Details, Edit) created dynamically-->
</div>
<div id="webmap-toolbar-right">
<!--create the search tool-->
</div>
<div id="webmap-toolbar-center">
<!--Basemap,measure,share,time and layer list tools added if enabled-->
</div>
</div>
</div>
<!--End Toolbar-->
<!--Left Panel-->
<div data-dojo-type="dijit.layout.BorderContainer" id="leftPane" data-dojo-props="design:'headline', gutters:false,region:'left'"
style="height:100%;padding:0;display:none;"></div>
<!--End Left Panel-->
<!-- Map Section -->
<div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props='region:"center"' dir="ltr">
<div id="logo" class="logo" style="display:none;">
<!--If a logo is specified in config section then the logo will be added
to the map-->
</div>
<!--Floating window that contains the measure dijit-->
<div id="floater">
<div id="measureDiv"></div>
</div>
<!--Floating window contains the time slider-->
<div id="timeFloater" style='display:none;'></div>
</div>
<!--end Map section-->
</div>
</div>
<div id="bottomPane" dojotype="dijit.layout.ContentPane" region="bottom"
gutters="false" style="display:none;margin:10px 5px;width:auto;height:275px;background-color:white;"></div>
<!-- End Main Content section-->
</div>
</body>
</html>
... View more
05-29-2014
08:35 AM
|
0
|
0
|
489
|
|
POST
|
Ok, I followed all the steps here to download app template: http://doc.arcgis.com/en/arcgis-online/create-maps/download-app-templates.htm I saved the contents into a folder in wwwroot. My arcgis online map is public. I changed the web map id code to my map (though I removed it from below). When I open up the html file in a browser, nothing shows up. Is something wrong with the code? I also, copied and pasted my web map id into other web maps that worked in my wwwroot folder and the map showed up. But with this code I downloaded from ESRI, it is not working. Code below. Sorry for all the questions, I'm still trying to learn! Thanks for your help! <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sea Level Rise Test</title>
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.9/js/dojo/dijit/themes/claro/document.css">
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.9/js/dojo/dojox/layout/resources/FloatingPane.css">
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.9/js/esri/css/esri.css" />
<link rel="stylesheet" type="text/css" href="css/layout.css">
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->
<script type="text/javascript">
var path_location = location.pathname.replace(/\/[^/]+$/, '');
var dojoConfig = {
parseOnLoad: true,
packages: [{
name: "esriTemplate",
location: path_location
}, {
name: "utilities",
location: path_location + '/javascript'
}, {
name: "apl",
location: path_location + '/apl'
},{
name: "templateConfig",
location: path_location
}]
};
</script>
<script type="text/javascript" src="//js.arcgis.com/3.9/">
</script>
<script type="text/javascript">
dojo.require("esri.layout");
</script>
<script type="text/javascript" src="javascript/layout.js">
</script>
<script type="text/javascript">
dojo.require("utilities.App");
dojo.require("dojo.on");
dojo.require("templateConfig.commonConfig");
var i18n;
dojo.ready(function(){
i18n = dojo.i18n.getLocalization("esriTemplate","template");
var defaults = {
//The ID for the map from ArcGIS.com
webmap: "ENTER web ID Here",
//Modify this to point to your sharing service URL if you are using the portal
sharingurl: null,//for example: "http://www.arcgis.com",
//The id for the web mapping application item that contains configuration info - in most
////When editing you need to specify a proxyurl (see below) if the service is on a different domain
//Specify a proxy url if you will be editing, using the elevation profile or have secure services or web maps that are not shared with everyone.
proxyurl: "",
//cases this will be null.
appid: "",
//set to true to display the title
displaytitle: true,
//Enter a title, if no title is specified, the webmap's title is used.
title: "",
//Enter a description for the application. This description will appear in the left pane
//if no description is entered the webmap description will be used.
description: "",
//specify an owner for the app - used by the print option. The default value will be the web map's owner
owner: '',
//Specify a color theme for the app. Valid options are gray,blue,purple,green and orange
theme: 'gray',
//Optional tools - set to false to hide the tool
//set to false to hide the zoom slider on the map
displayslider: true,
displaymeasure: true,
displaybasemaps: true,
displayoverviewmap: true,
displayeditor: true,
displaylegend: true,
displaysearch: true,
displaylayerlist: true,
displaybookmarks: true,
displaydetails: true,
displaytimeslider: true,
displayprint: true,
displayprintlegend: false,
displayeditortoolbar: false,
displaymapwidgets:true,
//i18n.viewer.main.scaleBarUnits,
//The elevation tool uses the measurement tool to draw the lines. So if this is set
//to true then displaymeasure needs to be true too. NOTE: THis tool is deprecated and should no
//longer be used in the Basic Viewer. Use the new version of the template instead
//https://github.com/Esri/elevation-profile-template
displayelevation: false,
//This option is used when the elevation chart is displayed to control what is displayed when users mouse over or touch the chart. When true, elevation gain/loss will be shown from the first location to the location under the cursor/finger.
showelevationdifference: false,
displayscalebar: true,
displayshare: true,
//Set to true to display the left panel on startup. The left panel can contain the legend, details and editor. Set to true to
//hide left panel on initial startup. 2
leftPanelVisibility: true,
//If the webmap uses Bing Maps data, you will need to provide your Bing Maps Key
bingmapskey: commonConfig.bingMapsKey,
//Get the default map units
units: commonConfig.units,
//specify a group in ArcGIS.com that contains the basemaps to display in the basemap gallery
//example: title:'ArcGIS Online Basemaps' , owner:esri
basemapgroup: {
title: null,
owner: null
},
//Enter the URL's to the geometry service, print task and geocode service.
helperServices: commonConfig.helperServices,
//Set the label in the nls file for your browsers language
printlayouts: [{
layout: 'Letter ANSI A Landscape',
label: i18n.tools.print.layouts.label1,
format: 'PDF'
}, {
layout: 'Letter ANSI A Portrait',
label: i18n.tools.print.layouts.label2,
format: 'PDF'
}, {
layout: 'Letter ANSI A Landscape',
label: i18n.tools.print.layouts.label3,
format: 'PNG32'
}, {
layout: 'Letter ANSI A Portrait',
label: i18n.tools.print.layouts.label4,
format: 'PNG32'
}],
printlayout: false,
printformat: "PNG32",
//Specify the geocoder options. By default uses the geocoder widget with the default locators. If you specify a url value then that locator will be used.
placefinder: {
"url": "",
"countryCode":"",
"currentExtent":false,
"placeholder": "",
"singleLineFieldName":""
},
//when true locations searches use the current map extent.
searchextent: false,
//Set link text and url parameters if you want to display clickable links in the upper right-corner
//of the application.
//ArcGIS.com. Enter link values for the link1 and link2 and text to add links. For example
//url:'http://www.esri.com',text:'Esri'
link1: {
url: '',
text: ''
},
link2: {
url: '',
text: ''
},
//specify the width of the panel that holds the editor, legend, details
leftpanewidth: 228,
//Restrict the map's extent to the initial extent of the web map. When true users
//will not be able to pan/zoom outside the initial extent.
constrainmapextent: false,
//Provide an image and url for a logo that will be displayed as a clickable image
//in the lower right corner of the map. If nothing is specified then the esri logo will appear.
customlogo: {
image: '',
link: ''
},
//embed = true means the margins will be collapsed to just include the map no title or links
embed: false
};
var supportsLocalization = true;
var app = new utilities.App(defaults, supportsLocalization);
dojo.on(app, "ready", function(config){
initMap(config);
});
});
</script>
</head>
... View more
05-29-2014
08:34 AM
|
0
|
2
|
2627
|
|
POST
|
Hi, I want to add a map that I created on ArcGIS Online to my website (currently developing locally; I haven't uploaded the page to my server yet). I have tried to follow the tutorials listed here for doing that: https://developers.arcgis.com/javascript/jssamples/ags_createwebmapitem.html, and when I copy and paste the code and save the file, and open the local html file in a browser, nothing shows up! I even tried using my own web map id in the code, and still nothing shows up. (I have made my ArcGIS online map public). When I do the basic, add a map to your website tutorial, a map shows up. But when I want to show a map from ArcGIS online, nothing shows. Why is it doing this? Thanks.
... View more
05-22-2014
08:03 AM
|
0
|
2
|
1704
|
|
POST
|
Any suggestions on the best methods to move from Flex API to JavaScript? Most of my online maps were made using in Flex and I want to change them to the JavaScript API. Thanks!
... View more
04-14-2014
08:36 AM
|
0
|
3
|
2483
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 01-08-2016 10:52 AM | |
| 1 | 02-24-2015 11:11 AM | |
| 1 | 02-19-2015 10:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|