|
POST
|
Thanks for creating a sample! Just what I needed 😃 No worries about the handles....they aren't showing up because jsfiddle cannot access your images. Got it to completely hide but you will need to fix the container. To Fix: Remove the inline styling on 'slide-out-div' and 'slide-out-div1' (also remove the extra semi-colons). Change the styling with CSS as you see fit. <div class="slide-out-div"> <div id="innerTOC"> <!-- code here --> </div> </div> <div class="slide-out-div1"> <div id="innerTOC"> <!-- code here --> </div> </div> *edit Here's a jsfiddle: http://jsfiddle.net/7g4ta/6/ Notes: - Changed background color on the handles so they can be seen in jsfiddle (see CSS classes) - Changed 'topPos' to 120px from 90px for 'slide-out-div1' - Removed inline styling from slide-out-div, slide-out-div1 and innerTOC divs (NOTE: please do not use the same ID for multiple divs) - Changed 'height: auto !important' on 'slide-out-div1' You will need to make a few more CSS changes to achieved your desired outcome. If you feel you have recieved a sufficient response, please mark a post as the answer and mark this thread as answered. Thanks!!!
... View more
01-06-2014
10:08 AM
|
0
|
0
|
1561
|
|
POST
|
Given that IE-8 scores a whopping 43 out of a possible 555 points on http://html5test.com/ maybe that's the problem right there? Indeed.... I'm not sure those warnings will ever go away when viewing your web application in IE8.
... View more
01-06-2014
09:16 AM
|
0
|
0
|
2366
|
|
POST
|
If you are using jQuery with DOJO elements, it probably has to do with conflicting CSS. Have you inspected the offending container with firebug in firefox or webdevtoolbar in chrome? Otherwise, recreate the issue using http://jsfiddle.net/ and we can take a look 😃
... View more
01-06-2014
08:18 AM
|
0
|
0
|
1561
|
|
POST
|
Interesting! What browser and what specific version are you using?
... View more
01-06-2014
08:11 AM
|
0
|
0
|
2366
|
|
POST
|
Made some changes. Let me know what you think.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Simple Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
</style>
<script>dojoConfig = {async: true, parseOnLoad: true}</script>
<script src="http://js.arcgis.com/3.8/"></script>
<script>
var map, dialog;
require([
"dojo/dom-construct", "dojo/on", "dojo/dom",
"esri/map", "esri/layers/FeatureLayer",
"esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/graphic", "esri/lang",
"dojo/_base/Color", "dojo/number", "dojo/dom-style",
"dijit/TooltipDialog", "dijit/popup", "dojo/domReady!"
], function(
domConstruct, on, dom,
Map, FeatureLayer,
SimpleFillSymbol, SimpleLineSymbol,
SimpleRenderer, Graphic, esriLang,
Color, number, domStyle,
TooltipDialog, dijitPopup
) {
map = new Map("map", {
basemap: "streets",
center: [-80.94, 33.646],
zoom: 8,
slider: false
});
window.myMap = map;
var southCarolinaCounties = new FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3", {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["NAME", "POP2000", "POP2007", "POP00_SQMI", "POP07_SQMI"]
});
southCarolinaCounties.setDefinitionExpression("STATE_NAME = 'South Carolina'");
var symbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255,255,255,0.35]),
1
),
new Color([125,125,125,0.35])
);
southCarolinaCounties.setRenderer(new SimpleRenderer(symbol));
map.addLayer(southCarolinaCounties);
map.infoWindow.resize(245,125);
dialog = new TooltipDialog({
id: "tooltipDialog",
style: "position: absolute; width: 250px; font: normal normal normal 10pt Helvetica;z-index:100"
});
dialog.startup();
var highlightSymbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255,0,0]), 3
),
new Color([125,125,125,0.35])
);
//close the dialog when the mouse leaves the highlight graphic
map.on("load", function(){
map.graphics.enableMouseEvents();
map.graphics.on("mouse-out", closeDialog);
});
//listen for when the onMouseOver event fires on the countiesGraphicsLayer
//when fired, create a new graphic with the geometry from the event.graphic and add it to the maps graphics layer
southCarolinaCounties.on("mouse-over", function(evt){
var t = "<b>${NAME}</b><hr><b>2000 Population: </b>${POP2000:NumberFormat}<br>"
+ "<b>2000 Population per Sq. Mi.: </b>${POP00_SQMI:NumberFormat}<br>"
+ "<b>2007 Population: </b>${POP2007:NumberFormat}<br>"
+ "<b>2007 Population per Sq. Mi.: </b>${POP07_SQMI:NumberFormat}";
var content = esriLang.substitute(evt.graphic.attributes,t);
var highlightGraphic = new Graphic(evt.graphic.geometry,highlightSymbol);
map.graphics.add(highlightGraphic);
dialog.setContent(content);
domStyle.set(dialog.domNode, "opacity", 0.85);
dijitPopup.open({
popup: dialog,
x: evt.pageX,
y: evt.pageY
});
});
function closeDialog() {
map.graphics.clear();
dijitPopup.close(dialog);
}
on(dom.byId("hideMapBtn"), "click", function(){
console.log("HIDE");
window.myMap.container.style.display="none";
var mapNode = dojo.byId("map");
domConstruct.place(mapNode,dojo.byId('hidecontent'),"last");
var contentPane =dijit.registry.byId("mapdiv");
contentPane.setHref("load.html");
});
on(dom.byId("showMapBtn"), "click", function(){
console.log("SHOW");
if(window.myMap.container.style.display == "none"){
var contentPane =dijit.registry.byId("mapdiv");
contentPane.setHref("mapcontainer.html");
contentPane.set("onDownloadEnd",function(){
var mapNode = dojo.byId("map");
domConstruct.place(mapNode,dojo.byId('mapcontainer'),"last");
window.myMap.container.style.display="block";
});
}
});
});
</script>
</head>
<body class="claro">
<div id="hidecontent"></div>
<div id="mapdiv" data-dojo-type="dijit/layout/ContentPane" >
<div id="map"></div>
</div>
<input id="hideMapBtn" type='submit'>
<input id="showMapBtn" type='submit' value='show'>
</body>
</html>
... View more
01-06-2014
08:02 AM
|
0
|
0
|
1102
|
|
POST
|
Great! Those errors should go away when you change the doctype of your webpage to the HTML5 standard: <!DOCTYPE html>
... View more
01-06-2014
07:23 AM
|
0
|
0
|
2366
|
|
POST
|
Hi Aaron, If you don't mind, could you recreate the issue using http://jsfiddle.net/ ? It's hard to see what could be causing the problem without any code. Thank you!!
... View more
01-06-2014
07:18 AM
|
0
|
0
|
913
|
|
POST
|
Try this: query.geometry = new esri.geometry.Extent(-1, -1, 1, 1, new esri.SpatialReference({wkid:4326})); *edit According to the documentation, the spatialReference property needs to be a spatialReference object, not a string or integer. https://developers.arcgis.com/en/javascript/jsapi/extent.html
... View more
01-03-2014
12:51 PM
|
0
|
0
|
1181
|
|
POST
|
Those center values are for Washington DC. I use them in my samples. *edit Just saw your edit. Glad it is working!
<!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">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Build your first application</title>
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style type="text/css">
html, body, #map {
padding: 0;
margin: 0;
height: 100%;
}
#HomeButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
</style>
<script src="http://js.arcgis.com/3.8/"></script>
<script>
var map;
require([
"esri/map",
"esri/dijit/HomeButton",
"dojo/ready",
"dojo/on",
"esri/geometry/Polyline",
"esri/geometry/Extent",
"esri/graphic",
"esri/symbols/SimpleLineSymbol",
"dojo/domReady!"
], function(
Map, HomeButton, ready, on, Polyline, Extent, Graphic, SimpleLineSymbol
) {
//var ext = new Extent({ xmin: -8614312, ymin: 4687051, xmax: -8536040, ymax: 4730894, spatialReference: { wkid: 102100} });
var map = new Map("map", { basemap: "streets", zoom: 11, center: [-122.67, 45.54]});
var home = new HomeButton({map: map}, "HomeButton");
home.startup();
window.map = map;
ready(function (){
on(map, "load", drawPath);
function drawPath(){
var polylineJson1 = { "paths":[[[-122.68,45.53], [-122.58,45.55], [-122.57,45.58],[-122.53,45.6]]], "spatialReference":{"wkid":4326}};
var polylineJson2 = { "paths":[[[-122.68,45.53], [-122.58,45.55], [-122.57,45.58],[-122.53,45.6]]], "spatialReference":{"wkid":4326}};
var polyline1 = new Polyline(polylineJson1);
var polyline2 = new Polyline(polylineJson2);
var polylineSymbolRed = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 9);
var polylineSymbolBlue = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,0,255]), 3);
var redLine = new Graphic(polyline1, polylineSymbolRed, null, null);
var blueLine = new Graphic(polyline2, polylineSymbolBlue, null, null);
map.graphics.add(redLine);
map.graphics.add(blueLine);
}
});
});
</script>
</head>
<body class="claro">
<div id="map">
<div id="HomeButton"></div>
</div>
</body>
</html>
... View more
01-03-2014
10:09 AM
|
0
|
0
|
1248
|
|
POST
|
Hi Greg, I'm 95% sure I've seen this issue before but couldn't find the thread. Could you replicate the issue in a http://jsfiddle.net/ so I can check out the code in action? It might refresh my memory... Thanks!
... View more
01-03-2014
09:55 AM
|
0
|
0
|
461
|
|
POST
|
It seems that your polyline is getting added after-all... only it was drawing off screen. Your data needs to be in a recognizable spatial reference (geographic: 4326 or web-mercator: 102100 preferred). I used an online converter to convert your data to wkid 102100 and was able to see the polyline on the map. Basically, I couldn't work with data in the wkid 26973 format. Are you using a custom basemap with a spatial reference of 26973 by chance?
... View more
01-03-2014
09:47 AM
|
0
|
0
|
1248
|
|
POST
|
The "..." means more data. There are hundreds of pairs. You can eliminate the "..." and test others only. Thank. var polylineJson = { 'paths': [ [ [201394.01178484457,173661.08635829584], [201392.0117168416,173661.08690949593], [ 201388.01158083565, 173661.08801189612 ], [ 201386.01151283266, 173661.08856309619 ], [ 201384.0114448297, 173661.08911429628 ], [ 201382.0113768267, 173661.08966549637 ], [ 201380.01130882374, 173661.09021669647 ], [ 201378.01124082075, 173661.09076789653 ] ] ] }; Great! What coordinate system are these paths in?
... View more
01-03-2014
08:36 AM
|
0
|
0
|
1248
|
|
POST
|
I believe 'data-*' is a valid property on HTML5 elements. Is your webpage in HTML5? * * * Read more here about Dojo-specific data props: http://www.sitepen.com/blog/2012/01/19/html5-data-dojo-attribute-support/ Read more about HTML5 data props: http://ejohn.org/blog/html-5-data-attributes/ *edit You posted while I was posting; my suspicion was correct 😃 Is there any reason you aren't using HTML5?
... View more
01-03-2014
08:30 AM
|
0
|
0
|
2366
|
|
POST
|
Data are like that: var polylineJson = { 'paths': [ [ [ 201394.01178484457, 173661.08635829584 ], [ 201392.0117168416, 173661.08690949593 ], [ 201390.01164883861, 173661.08746069603 ], ... ] ] }; Thanks. Having "..." isn't valid syntax for a polylineJson object.
... View more
01-03-2014
08:23 AM
|
0
|
0
|
1248
|
|
POST
|
I don't have a good answer for you because I don't know what the numbers in your path represent. (e.g. What do you mean by 'double'?) Are you able to change the numbers of the path to a spatial reference of either geographic (wkid: 4326) or web mercator (wkid: 102100)? *edit Could you post your entire polylineJson object definition so I can fiddle with it?
... View more
01-03-2014
07:55 AM
|
0
|
0
|
1248
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-26-2014 09:56 AM | |
| 1 | 09-18-2014 11:50 AM | |
| 1 | 09-19-2014 11:28 AM | |
| 1 | 07-09-2014 01:43 PM | |
| 1 | 07-09-2014 02:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-14-2024
05:31 PM
|