|
POST
|
This works for me now in IE11. I tried it using IE 8/9/10 emulation as well, and it works, although I still need to click twice for the point to show. I don't have a "real" instance of IE <11 to test, though... Try clearing your cache and restarting IE.
... View more
05-19-2015
07:55 AM
|
1
|
5
|
1278
|
|
POST
|
Tim, Try this: map.on("load", function () {
toolbar = new Draw(map);
toolbar.on("draw-end", addToMap);
//toolbar.on("draw-complete", addMeas);
editToolbar = new Edit(map);
map.on("click", function (evt) {
editToolbar.deactivate();
});
createMapMenu();
createGraphicsMenu();
map.reposition();
map.resize();
}); I added "reposition" and "resize" in your map onload event handler. This worked for me when I ran it in IE's debugger.
... View more
05-19-2015
07:45 AM
|
0
|
7
|
1278
|
|
POST
|
This may be related: Re: Mouse cursor offset from map points in basic viewer template IE only
... View more
05-19-2015
07:24 AM
|
1
|
0
|
1278
|
|
POST
|
I think it has something to do with the bottom div - if I remove the left/top attributes of #bottom, it puts your "created by" div at the top; however, the points are no longer offset in IE. UPDATE - I think I changed something else in addition to this as I tried to replicate the resolution and was unsuccessful.
... View more
05-19-2015
07:13 AM
|
0
|
6
|
2508
|
|
POST
|
I had this problem as well - honestly, I can't remember the resolution, but I know one exists! I'll see if I can dig it up...
... View more
05-19-2015
07:07 AM
|
1
|
0
|
2508
|
|
POST
|
I am sure there is a better answer for this as whenever someone mentions "global vars", you should generally think "no" to avoid collisions and conflicts - however, I have accomplished this via the following: //instantiate your module
window.objmyModule = new myModule({
"myParam": paramValue
});
//call a module function after you've instantiated the object
objmyModule.myFunction();
... View more
05-19-2015
06:13 AM
|
1
|
0
|
627
|
|
POST
|
Thanks - I had a feeling we'd probably have to go this route. I'll give it a go...
... View more
05-19-2015
06:01 AM
|
0
|
1
|
1157
|
|
POST
|
And I know some may ask why would I ever want to redirect the parent page, which contains the map - I know, I am not crazy about this, either, but our requirements are that we cannot open tabs or pop-ups, unfortunately... we must redirect the parent (maps are embedded within an iFrame).
... View more
05-15-2015
02:45 PM
|
0
|
3
|
1157
|
|
POST
|
I have an application creating layers from an asynch JSON request - in the data pull, I have a field that contains a URL embedded within an anchor tag html element. I am creating a featureLayer object from a featureCollection, which contains a layerDefinition where the URL field is defined. Everything works well - the layer loads with the proper symbology and all of my fields exist within the layer object; however, when the InfoWindow opens, the link automatically assigns "_blank" as the target: Even If I explicitly set the target in the html element, e.g.: <a href="http://www.google.com" target="_parent">Google</a> We still end-up with "_blank" as the target. I tried using a javascript function, e.g. href=javascript:window.open('www.google.com', '_parent'); But, the target is prepended. Is there something within the InfoWindow class that automagically adds the target attribute? Nothing jumped out while I perused the API class page: InfoWindow | API Reference | ArcGIS API for JavaScript Thanks for the help.
... View more
05-15-2015
02:41 PM
|
0
|
4
|
4895
|
|
POST
|
No problem, I wasn't sure if this tutorial would work for you since you were having resource problems on another one. Just thought I'd point out another one if it helped you at all.
... View more
05-15-2015
01:16 PM
|
0
|
0
|
825
|
|
POST
|
Not sure if this is helpful for your case, but here's a tutorial on classy js: Writing a Class | Guide | ArcGIS API for JavaScript
... View more
05-15-2015
01:03 PM
|
0
|
3
|
825
|
|
POST
|
Not sure if this occurred in your case, but depending on which browser you're using, and how your JavaScript is developed, I've noticed caching can be pretty robust, even when refreshing using ctrl-F5. I usually clean cache and close my browser when making JS updates in my .js module files. Any JS in front end files, e.g. .aspx/.html, seems to get updated after a hard refresh.
... View more
05-15-2015
12:04 PM
|
2
|
1
|
1643
|
|
POST
|
The version on GitHub still shows the two separate functions - in main.js. Can you update that with the code that's only populating part of the list?
... View more
05-15-2015
11:18 AM
|
2
|
3
|
1643
|
|
POST
|
You could also shorten it a little bit, if you wanted to do this, by sending in your layer object: populateSelect("MUTCD", "mutcd", app.signLayer); And adjusting the domain set-up, to something like this: var domain = app.layer.getDomain(x); This would negate the need for a switch statement or conditional.
... View more
05-15-2015
09:53 AM
|
2
|
1
|
1643
|
|
POST
|
Those two functions are exactly the same, except for the "//get the domain value" part. Would this work for you? function populateSelect(x, y, layer) {
//get the domain value
var domain;
switch(layer) {
case 'support':
domain = app.supportLayer.getDomain(x);
break;
case 'sign':
domain = app.signLayer.getDomain(x);
break;
}
//get the html select by ID
var select = document.getElementById(y);
//clear the current options in select
for (var option in select) {
select.remove(option);
}
var opt = document.createElement('option');
opt.innerHTML = "";
select.appendChild(opt);
//loop through the domain value to fill the drop down
for (var i = 0; i < domain.codedValues.length; i++) {
console.log(domain.codedValues.name);
; var opt = document.createElement('option');
opt.innerHTML = domain.codedValues.name;
opt.value = domain.codedValues.name;
select.appendChild(opt);
}
} Usage would be like so: populateSelect("MUTCD", "mutcd", "sign");
... View more
05-15-2015
09:43 AM
|
2
|
8
|
1643
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-16-2020 01:25 PM | |
| 1 | 03-20-2019 09:07 AM | |
| 2 | 07-31-2015 07:31 AM | |
| 1 | 09-14-2015 12:14 PM | |
| 1 | 05-12-2015 12:04 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-27-2023
02:30 AM
|