|
POST
|
Thank you Riyas, the css worked but the info template did not. I am not sure why the Info Window is not showing up when I use feature.setInfoTemplate(infoTemplateUtilities); It does work when I use feature.setInfoTemplate(new esri.InfoTemplate());
... View more
09-24-2014
08:31 AM
|
0
|
0
|
2167
|
|
POST
|
I am trying to format the info window template and it is not working. here is my code below: Also, is it possible to change the background color of the info window header through css?
var identify = new esri.tasks.IdentifyTask(".../MapServer");
var identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.returnGeometry = true;
identifyParams.tolerance = 3;
map.infoWindow.clearFeatures();
//Define a good infoTemplate
var infoTemplateUtilities = new InfoTemplate();
infoTemplateUtilities.setTitle("Facility: <b>${FACILITYID}</b>");
infoTemplateUtilities.setContent("MAPREF NUMBER : <b>${MAPREF}</b><br/>" +
"<b>2007 density: </b>${POP07_SQMI:compare}<br/><br/>" +
"<b>2000: </b>${POP2000:NumberFormat}<br/>" +
"<b>2000 density: </b>${POP00_SQMI:NumberFormat}");
try {
identify.execute(identifyParams, function (results) {
map.infoWindow.setFeatures(dojo.map(results, function (result) {
var feature = result.feature;
feature.infoTemplate.setInfoTemplate(infoTemplateUtilities); //<====== This method here does not work at all...
//feature.setInfoTemplate(new esri.InfoTemplate()); //<====== This method here works fine...
return feature;
}));
map.infoWindow.show(evt.mapPoint);
});
}
catch (ex) {
alert(ex.toString());
}
... View more
09-24-2014
08:07 AM
|
0
|
10
|
3054
|
|
POST
|
Thank you Steven, here is what I did and it works fine: function doIdentify(event) { var measureMode = dojo.query(".esriButton .dijitButtonNode").some(function (node, index, arr) { if (node.childNodes[0].checked) { //at least one of the measure tools is active so disable identify return true; } }); if (!measureMode) { //insert the identify task code here... }; }
... View more
09-17-2014
11:22 AM
|
3
|
0
|
422
|
|
POST
|
I also tried to just call the method map.setInfoWindowOnClick(false); and it didn't do anything. I do not think my app is recognizing the setInfoWindowOnClick method. I am wondering if there is a requirement for that method to work.?
... View more
09-17-2014
10:29 AM
|
0
|
1
|
2029
|
|
POST
|
Added, and the identify is still showing up when measuring and yes, I am using 3.10 version: var measurement = new Measurement({ map: map }, dom.byId("measurementDiv")); measurement.startup(); map.on("mouse-over", windowPop); function windowPop() { if (measurement.area.checked || measurement.distance.checked || measurement.location.checked) { map.setInfoWindowOnClick(false); } else { map.setInfoWindowOnClick(true); } } measurement.on("measure-end", function () { map.setInfoWindowOnClick(true); });
... View more
09-17-2014
10:22 AM
|
0
|
2
|
2029
|
|
POST
|
here is my code: var measurement = new Measurement({ map: map }, dom.byId("measurementDiv")); measurement.startup(); function windowPop() { if (measurement.area.checked || measurement.distance.checked || measurement.location.checked) { map.setInfoWindowOnClick(false); } else { map.setInfoWindowOnClick(true); } } measurement.on("measure-end", function () { map.setInfoWindowOnClick(true); });
... View more
09-17-2014
09:23 AM
|
0
|
4
|
2029
|
|
POST
|
Thank you Tim for replying, but it does not seem to work. I am wondering if it could be the mouse-over method. is there a measure-start method?
... View more
09-17-2014
08:41 AM
|
0
|
6
|
2029
|
|
POST
|
I would like to deactivate the identify when doing measurement. here is my function identify code:
function initFunctionality() {
//map.on("click", doIdentify);
dojo.connect(map, "onClick", doIdentify);
identifyTask = new IdentifyTask(".../MapServer");
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [21, 54, 36];
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
map.infoWindow.resize(650, 200);
map.infoWindow.setContent(registry.byId("tabs").domNode);
map.infoWindow.setTitle("Utilities Identify Results");
symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0]), 2),
new Color([255, 255, 0, 0.25]));
}
and I am calling this function on the following event:
//dojo.connect(map, "onLoad", initFunctionality);
//map.on("load", initFunctionality);
map.on("layers-add-result", initFunctionality);
This makes the identify window showing up each time I click on the map. I would like to only call the identify only when I click on the identify button on the toolbar to activate the identify function. But when I try to call the initFunctionality() from a button click event, the identify won't work. for some reason, it is only working when called from map.on("load") or map.on("layers-add-result").
... View more
09-17-2014
08:07 AM
|
0
|
10
|
4634
|
|
POST
|
Yes I did. found it. was the image link in my css... .dojoxFloatingMinimizeIcon { background:url('../../../dijit/themes/tundra/images/spriteArrows.png') no-repeat 0px center; width:7px; margin: 0px 4px; overflow:hidden; float:right; } thank you. for now I am using this short-cut even thought it is just minimizing the panel on bottom of of screen. Thank you Ken
... View more
09-16-2014
01:55 PM
|
0
|
0
|
2445
|
|
POST
|
Thanks Ken, your short-cut is a really nice work around. mine still does not show the down arrow but it does hide when I click on the top right corner of the title pane
... View more
09-16-2014
01:39 PM
|
0
|
3
|
2445
|
|
POST
|
Thank you Steven, I could just use a simple div, but I do like the idea of the floating pane for my other tools and being able the move the panel around the page... I wish the floating panel could be that simple, now it's almost 8 hours that I am trying to figure this thing out!
... View more
09-16-2014
01:28 PM
|
0
|
0
|
2445
|
|
POST
|
Thank you Ken, but my floatingPane does not seem to have that down arrow. how do you get the narrow down to show up like yours? as you can see bellow, my floatingPanel after setting to false the closable option and still no down narrow
... View more
09-16-2014
11:45 AM
|
0
|
8
|
3670
|
|
POST
|
Re: floatingPane riyasdeen_b proposition to rewrite the entire code for just closing and reopening the floating pane, I think is too much. kenbuja's short-cut looks interesting, but still trying to figure out how to may be add a close link in the title bar to hide the panel on click event....
... View more
09-16-2014
10:56 AM
|
0
|
10
|
3670
|
|
POST
|
I have a declarative floatingPane that opens on a button click. but once closed, it won't open again. Apparently, the floating pane get destroyed after closing. how do I overwrite that behavior? <div data-dojo-type="dijit/form/Button" id="measure" data-dojo-props="iconClass:'measureIcon'" title="Measure" onclick="showDialogMeasure()"> </div> <!--Dialog Measurements--> <div data-dojo-type="dojox.layout.FloatingPane" id="dFloatingPane" data-dojo-props="resizable:true, dockable:false, title:'Measurement'" style="position: absolute; top: 30%; left: 25%; width: 280px; height: 180px; visibility: hidden; padding: 0; margin: 0;"> <div id="measurementDiv" class="divMeasurement"></div> </div>
function showDialogMeasure() {
if (dijit.byId("dFloatingPane").style.visibility === "hidden") {
dijit.byId("dFloatingPane").show();
}
dijit.byId("dFloatingPane").show();
}
... View more
09-16-2014
06:22 AM
|
0
|
18
|
9059
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-12-2024 07:03 AM | |
| 1 | 12-11-2024 02:20 PM | |
| 2 | 06-27-2023 09:06 PM | |
| 1 | 12-17-2021 08:58 AM | |
| 3 | 12-17-2021 09:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2024
05:34 PM
|