|
POST
|
Here's a fiddle of your layout. Seems fine to me. The only difference is I removed the height and width from the inner border container. Perhaps there is something with your javascript.
... View more
03-31-2014
04:47 AM
|
0
|
0
|
1990
|
|
POST
|
I suspect the absolute position on the map div may have been causing the problem. Being a code guy, you may find it easier to create your layout with code rather than with markup. All my apps have nothing more than [HTML]<div id="container"></div>[/HTML] for markup. The rest is all code. Here and Here Simple examples but you get the idea. Be sure to check out the dojo docs for dijit/layout as it has good examples. I'll certainly take a look at anything you post. Cheers.
... View more
03-30-2014
03:37 PM
|
0
|
0
|
1990
|
|
POST
|
You had an unnecessary div wrapping the footer. All non-center regions should have height or width set depending on top/bottom or left/right. Alternatively you can set the doLayout property to false. This will size the region to fit the content. This is most helpful for top/bottom regions. You had set position:absolute the map div. Center regions should never have position, width or height set (no region should have position property set). Let the border container do its job and handle position and sizing. Here's your markup as I would do it: <div id="container" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false, style:'width:100%;height:100%;'">
<div id="header" class="roundedCorners" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top', style:'height:50px;'">
This is the header section
</div>
<div id="left" class="roundedCorners" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left', style:'width:275px;'">
This is the left section
</div>
<div id="center" data-dojo-type="dijit/layout/BorderContainer" class="roundedCorners" data-dojo-props="region:'center', gutters:false">
<div id="map" data-dojo-type="dijit/layout/ContentPane" class="shadow" data-dojo-props="region:'center', style:'padding:0;overflow:hidden;'"></div>
<div id="footer" class="roundedCorners" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom', doLayout:false">
This is the footer section
</div>
</div>
</div> I added a height to the header and doLayout to the footer as examples.
... View more
03-30-2014
02:37 PM
|
0
|
0
|
1990
|
|
POST
|
Try resizing your BorderContainer after adding the region. borderContainer.resize(); Any time you change the layout at the border container level you need to resize. For good measure, I resize right before creating the map and as the last thing called during initialization. If you add regions or show/hide regions you should resize as part of those operations too. Those differences in location you're seeing are probably equal to (in pixels) the size of the region your adding. There's something about border containers with the map as center region that doesn't update when layout geometry changes. Where the map thinks it is on the screen and where it really is are different.
... View more
03-30-2014
09:57 AM
|
0
|
0
|
1990
|
|
POST
|
//it's open if (tp.open) { tp.toggle(); } //it's not open if (!tp.open) { tp.toggle(); }
... View more
03-28-2014
06:55 AM
|
0
|
0
|
1149
|
|
POST
|
Call toggle() on the title pane. titlePane.toggle();
... View more
03-28-2014
06:45 AM
|
0
|
0
|
1149
|
|
POST
|
The reference did have some errors in regard to this. I gave notice in this thread http://forums.arcgis.com/threads/101566-API-Reference-Error. It appears to me it's been fixed.
... View more
03-27-2014
05:18 PM
|
0
|
0
|
629
|
|
POST
|
Everyone is. It's query.js not Query.js. http://js.arcgis.com/3.7/js/esri/tasks/query.js
... View more
03-27-2014
04:42 PM
|
0
|
0
|
629
|
|
POST
|
Wesley, There could be several reasons for this. It's hard to tell w/o any code to review. Are you getting any errors in the console when the basemap doesn't load? Something that comes to mind is the map div resizing for some reason between creating the map and the basemap loading. This can happen w/ dijit/layout/BorderContainer in some scenarios especially when programmatically manipulating the layout. For example adding buttons to a toolbar that is a region. Calling resize() on the bc before and/or after map creation will fix this. Certainly any other layout that is being created or manipulated programmatically during app initializing in which the height and width of the map div change could cause the same problem.
... View more
03-27-2014
10:26 AM
|
0
|
0
|
541
|
|
POST
|
It's the AGS 10.1 SP1 query bug. Upgrade server installation. Or publish as a FeatureService.
... View more
03-27-2014
09:59 AM
|
0
|
0
|
676
|
|
POST
|
It looks like your class is a utility-like class. Maybe you have more methods and such you didn't share, but you can forgo declare and just return an object. Then you don't need to create the class to use it, instead just use its methods directly:
define([
"esri/tasks/QueryTask",
"esri/tasks/query"
], function (
QueryTask,
Query
) {
return {
doFind: function (featureUrl, meterId, queryString) {
//do stuff
},
doSomethingElse: function (a, b) {
//do stuff
}
};
});
require(['myClasses/utility'], function (utility) {
utility.doFind(a, b, c);
});
... View more
03-27-2014
07:47 AM
|
0
|
0
|
406
|
|
POST
|
I'm not sure why you are iterating the results when I assume you are returning a single feature. Second queryTask.execute is a deferred. Your return meterCoor; is being returned before the task is executed. Try: queryTask.execute(query, function (results) {
return results.features[0].geometry.x + "," + results.features[0].geometry.y;
}, function (e) {
console.log(e);
return e;
}); You can also create your own deferred and handle results or error outside the class: doFind: function () {
var deferred = new Deferred();
var query = new Query();
var queryTask = new QueryTask(this.featureUrl);
query.where = this.queryString + " = '" + this.meterId + "'";
query.returnGeometry = true;
query.outFields = ["*"];
queryTask.execute(query, function (results) {
deferred.resolve(results);
}, function (e) {
console.log(e);
deferred.reject('something has gone wrong');
});
return deferred;
}
... View more
03-27-2014
07:07 AM
|
0
|
0
|
406
|
|
POST
|
Hey Jay, You need to inspect the HTML that is produced when the basemap toggle is created. You'll see that your <span id="BasemapToggle"></span> is no longer a span but a div with the style attribute display:block, which overrides your css. The basemap toggle widget is manipulating the dom node you are are specifying as the srcNodeRef in the constructor. This is what templated widgets do. I won't go into the hows and whys. There's plenty of info on the dojo and sitepen web sites about widgets; how they are created and how they work. All templated widgets accept the the property className. The widget will add this class to the new dom node that is created. In your case you could: var toggle = new BasemapToggle({ map: app.map, basemap: "satellite", // here's our class to add className: "customToggle" }, "BasemapToggle"); toggle.startup(); We need to specify !important here because the widget is setting the style property on the element which always overrides any added class that does not. .customToggle { display: inline-block !important; } Even easier just add !important to your current css.
... View more
03-25-2014
02:40 PM
|
0
|
0
|
925
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-18-2013 06:56 AM | |
| 1 | 06-30-2015 09:17 AM | |
| 1 | 10-12-2013 07:14 AM | |
| 1 | 02-05-2014 11:05 AM | |
| 1 | 05-28-2015 11:41 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|