|
POST
|
Fantastic...works great...thanks....very appreciated.
... View more
03-27-2014
03:21 AM
|
0
|
0
|
318
|
|
POST
|
Thank you ... will get t his going... see how things go...will be in touch.. Thank you again...appreciated.
... View more
03-26-2014
06:03 AM
|
0
|
0
|
446
|
|
POST
|
The service is secured so just cancel out of that... Click to Tools at top of map. This will expand....I looking to get all on same line. http://jsfiddle.net/Jaykapalczynski/ZUxk5/11/ hope this helps...I knowthe image will be larger but trying to figure out how to get them inline as they are enclosed in DIV tags. Thanks
... View more
03-25-2014
01:05 PM
|
0
|
0
|
864
|
|
POST
|
They all stay on one line except the BaseMapToggle...confused.
<div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
<div>
<div data-dojo-type="dijit/TitlePane"
data-dojo-props="title:'Tools', closable:false, open:false">
<div data-dojo-type="dijit/layout/ContentPane" style="width:600; height:125px;">
<div style="display: inline"><input type="button" class="myButton" id="button1" value="Identify" /></div>
<div style="display: inline"><input type="button" class="myButton" id="button2" value="Finished" /></div>
<div style="display: inline"><span id="print_button"></span></div>
<div style="display: inline"><span id="BasemapToggle"></span></div>
</div>
</div>
</div>
</div>
... View more
03-25-2014
12:28 PM
|
0
|
0
|
864
|
|
POST
|
trying to get all 4 on the same line....the code below gets the first 3 on the same line but the BaseMapToggle is not...there is more than enough room on that line??? Thoughts? <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> <div class="TBtoolbar" id="select_button"> <div data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Tools', closable:false, open:false"> <div data-dojo-type="dijit/layout/ContentPane" style="width:600; height:125px;"> <input type="button" id="button1" value="Identify" /> <input type="button" id="button2" value="Finished" /> <span id="print_button"></span> <span id="BasemapToggle"></span> </div> </div> </div> </div> #print_button{ border: none; width: 50px; display: inline-block; } #BasemapToggle{ display: inline-block; border: none; width: 65px; }
... View more
03-25-2014
10:11 AM
|
0
|
6
|
1440
|
|
POST
|
This should work for either one... Create a global variable var buttonclick; Then create the function the button calls function buttoncall() {
buttonclick = dojo.connect(map, "onClick" resultFunction);
}
function resultFunction() {
dojo.disconnect(buttonclick);
alert("test");
} Give it a shot Do i have to define anything in HTML? Do I have to define anything in the REQUIRE? I really like this approach....just cant seem to get it working...is there something i am missing? Thanks
... View more
03-25-2014
09:49 AM
|
0
|
0
|
1304
|
|
POST
|
Looking at this example and had a few questions. https://developers.arcgis.com/javascript/jssamples/routetask_closest_facility.html 1. I see that it is creating 5 square graphics to route against. How do I add my own Service here 2. I dont see how the routing is referencing the Square Graphics added (would like to change this to my own point feature) 3. Is there anything else I would have to configure on my server? 4. Do I need to create my own proxy? urlUtils.addProxyRule({
urlPrefix: "route.arcgis.com",
proxyUrl: "/sproxy"
}); closestFacilityTask = new ClosestFacilityTask("http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World");
registry.byId("numLocations").on("change", function() {
params.defaultTargetFacilityCount = this.value;
clearGraphics();
});
... View more
03-25-2014
09:08 AM
|
0
|
2
|
900
|
|
POST
|
Thanks Jake..that worked great... Still trying to dig into this one though...its nice and streamlined and seems to shut down after each click in the map...would be nice to get this one going as well.... Do you still have to define the button in HTML?
var buttonclick;
function buttoncall() {
buttonclick = dojo.connect(map, "onClick" resultFunction);
}
function resultFunction() {
dojo.disconnect(buttonclick);
alert("test");
}
... View more
03-25-2014
08:29 AM
|
0
|
0
|
1304
|
|
POST
|
Hi Jay, Here is an example that sets the infoTemplate each time the button is clicked. I am doing to below....I the map and nothing....the way I want it. I then click the button and then click a feature...it grabs the attrbiute info and displays in a pane on the left. The issue is that it allows the user to continue clicking in the map....I want to create this where it jumps out after each map click. Cancel the functionality after a single click...so no longer call the Function AND OR cancel the Function call if another button is pressed... Say I have 2 buttons...Click one and it allows me to select and do what my code is doing below....UNTIL I click the other button
<input type="button" id="button" value="Identify" />
on(dom.byId("button"), "click", function () {
featureLayer.setInfoTemplate(template);
initializeSidebar(app.map);
on(app.map.infoWindow, "show", function () {
featureLayer.setInfoTemplate(null);
})
})
function initializeSidebar(map){
var popup = map.infoWindow;
//when the selection changes update the side panel to display the popup info for the
//currently selected feature.
connect.connect(popup, "onSelectionChange", function(){
displayPopupContent(popup.getSelectedFeature());
});
//when the selection is cleared remove the popup content from the side panel.
connect.connect(popup, "onClearFeatures", function(){
//dom.byId replaces dojo.byId
dom.byId("featureCount").innerHTML = "Click to select feature(s)";
//registry.byId replaces dijit.byId
registry.byId("leftPane").set("content", "");
domUtils.hide(dom.byId("pager"));
});
//When features are associated with the map's info window update the sidebar with the new content.
connect.connect(popup, "onSetFeatures", function(){
displayPopupContent(popup.getSelectedFeature());
dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";
//enable navigation if more than one feature is selected
popup.features.length > 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));
});
}
function displayPopupContent(feature){
if(feature){
var content = feature.getContent();
registry.byId("leftPane").set("content", content);
}
}
... View more
03-25-2014
06:18 AM
|
0
|
0
|
1304
|
|
POST
|
Is there anything that I need in the require([
], function(
) {
... View more
03-25-2014
05:59 AM
|
0
|
0
|
1304
|
|
POST
|
Looking to create a simple button that runs some code like IDENTIFY. I am looking for two scenarios: 1. The button must be pressed each time you want to run the code 2. The code runs until you select another button Anyone of an example for each...Appreciated.
... View more
03-25-2014
04:28 AM
|
0
|
11
|
1918
|
|
POST
|
that makes sense....I am just wondering WHY the examples do it both ways. if there is no reason or benefit to use app.map why use it in some examples and not in others. Makes learning a bit more difficult. Whats the purpose of the list???? At least I know now....I thank you for your patience and thoughts. Cheers
... View more
03-24-2014
12:19 PM
|
0
|
0
|
1323
|
|
POST
|
so you are saying that I dont need the app.map this is something the example did differently? If so whats the benefit of using it? very confused. EDIT: I got my example working just confused why different examples are using app.map instead of map...why the different usages?
... View more
03-24-2014
12:09 PM
|
0
|
0
|
1323
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|