POST
|
I've been planing around with the 3d API, and am trying to make a ObjectSymbol3DLayer graphic with the Eurocopter resource move across the map. Example url: 3D Test The problem is that this type of object seems to be too complex for the browser and can't be rendered quick enough. The texture does not load (solid white object) appears and has a tearing effect across the screen. After updating chrome the texturing seems to "catch up" slowly when the moving stops. It also doesn't remove the old graphic properly when using this type of resource. I should mention that when using a primitive sphere this draws smoothly, including removing the old graphics as they move. I use the following code to clone and add a new graphic since it is not currently possible to just update a graphics properties once its added to the map: var tempPlayer = this.playerGraphic.clone();
this.playerGraphicLayer.remove(this.playerGraphic);
tempPlayer.geometry.x += options.x;
tempPlayer.geometry.y += options.y;
tempPlayer.symbol.symbolLayers.items[0].heading = this.calculateHeading(options);
this.playerGraphic = tempPlayer.clone();
this.playerGraphicLayer.add(this.playerGraphic);
... View more
08-03-2017
03:17 PM
|
0
|
1
|
445
|
POST
|
Solved this by using proj4js. https://github.com/proj4js/proj4js
... View more
08-15-2016
09:04 AM
|
1
|
0
|
284
|
POST
|
Good morning, I have an app/map using the Polar Stereographic 5936 basemap located at: http://services.arcgisonline.com/arcgis/rest/services/Polar/Arctic_Ocean_Base/MapServer I need to convert the mouse coordinates to geographic lat/lon, is there anything similar to esri/geometry/webMercatorUtils to accomplish this? When I set that basemap in our Portal (10.3.1) and use the built in Portal Measure widget, the coordinates are very incorrect. It shows -180 lon (left edge of map) to +180 lon (right edge of map), and +90 lat (top of map), regardless of map position on the screen. Is this a known bug?
... View more
08-15-2016
06:58 AM
|
0
|
1
|
1131
|
POST
|
I have a custom "Banner" widget, which was based off of the HeaderController from the Foldable theme. I'm hoping to keep it as dynamic as possible with the WABde, but I think for apps that must be bilingual I will have to override this title code each time. I might build in some of the common Links to be replaced with nls when they are found. Thanks for pointing me in the correct direction!
... View more
07-08-2016
11:38 AM
|
0
|
0
|
517
|
POST
|
The apps I produce always need to be bilingual, English/French. This is easy to do with custom widgets, using the nls files. I even modified the About widget to use the nls for it's content instead of the config. Is it possible to have the title, subtitle, and links pull from an nls file? If not built in, has anyone modified WAB (dev edition) to do this? Thanks!
... View more
07-07-2016
06:50 AM
|
0
|
2
|
1865
|
POST
|
Thanks for the quick reply! While I havn't fully implemented this yet into my widget, I was able to do a quick test with that sample server and it worked perfectly!
var symbol = this.layers.layer.renderer.getSymbol();
var testDiv = dojo.create("div", { id: "testDiv", style: "width:20px; height:20px; border: 0px solid black;" }, this.legendDiv);
var mySurface = gfx.createSurface(dom.byId("testDiv"), 20, 20);
var descriptors = jsonUtils.getShapeDescriptors(symbol);
var shape = mySurface.createShape(descriptors.defaultShape).setFill(descriptors.fill).setStroke(descriptors.stroke);
shape.applyTransform({ dx: 10, dy: 10 });
... View more
02-24-2016
04:05 PM
|
0
|
0
|
2104
|
POST
|
I have a custom Legend widget which I made some time ago and have been using. It normally works by doing an esriRequest to get the Legend info for that layer. What I've encountered though is some layers do not have this info, example: http://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/World_UTM_Grid/FeatureServer/0 What I would like to do is use the Symbol object which I can get from the Renderer to create an image that I can use for the legend. I'm not particular on the format, but I've tried using the standard Legend widget with a layer like this and it creates an SVG path. How does the default Legend widget do this? Symbol -> SVG path. The markup for the service above would some create this: <path transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,15.00000000,15.00000000)" dojoGfxStrokeStyle="solid" stroke-dasharray="none" fill-rule="evenodd" d="M-10-10L 10 0L 10 10L-10 10L-10-10" path="M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E" stroke-miterlimit="4" stroke-linejoin="miter" stroke-linecap="butt" stroke-width="1" stroke-opacity="1" stroke="rgb(105, 105, 105)" fill-opacity="0.5019607843137255" fill="rgb(211, 211, 211)"></path> Thanks in advance!
... View more
02-24-2016
03:24 PM
|
0
|
6
|
5090
|
POST
|
I am wondering show to change the map zoom slider buttons from the two + - to the large vertical slider. in the javascript api it was as simple as using sliderStyle: "large" in the map constructor. I can't seem to find where I can configure this, there is no widget for it. I am using Web AppBuilder 1.1 (Developer Edition). Thanks!
... View more
08-10-2015
10:54 AM
|
0
|
1
|
2965
|
POST
|
I made a stripped down version of the site to test the attachment editor widget, and it worked. This proves to me that there isn't a problem accessing the actual feature layer or the service. I could potentially use the AttachmentEditor if I can get it to load in my custom info window (InfoTemplate). I'm not sure how to get this working though. I can get it to startup in a div (and appear in my popup), but to get the line attachmentEditor.showAttachments(graphic, featureLayer1); I don't know where I'm supposed to pull the graphic objects from. It's not wired to an event the gives that object like in the code sample.
... View more
08-04-2015
08:49 AM
|
0
|
0
|
417
|
POST
|
Yes attachments are enabled. The layer is published from my SDE. When I test featureLayer1.hasAttachments it returns true. Unfortunately I can't post the complete code for this site, it exists behind a firewall. Unfortunately the AttachmentEditor widget does not meet my needs for this project either.
... View more
08-04-2015
07:18 AM
|
1
|
0
|
417
|
POST
|
Good morning, I am attempting to add attachments to my feature layer but have encountered a problem. I have already successfully implemented code to view and delete existing attachments, and I thought my code was correct to add them, however the error callback function says: "Error: Access is denied." My feature layer does have editing enabled, and other tools in my app work properly. I do have the proxy thing working so I don't believe it is that either. Any suggestions? // Open the file dialog
dom.byId("inputAttachmentFile").click();
console.log(dom.byId("inputAttachmentFile").value);
featureLayer1.addAttachment(editingFeature.attributes["OBJECTID"], dom.byId("formAttachment"), function()
{
// Update the info window's html
dom.byId("buttonEditAttachment").innerHTML = "Delete";
dom.byId("spanAttachmentLink").innerHTML = "[link]";
console.log("Attachement added");
}, function (err)
{
console.log(err);
});
... View more
08-04-2015
06:22 AM
|
0
|
3
|
2966
|
POST
|
I am trying to create a dojo DateTextBox in the custom formatted Info Window that pops up when clicking features on my map. Within my info template I have code that looks like this (only the relevent stuff is here): infoTemplate.setContent( "<label for='myDateInput'>Date: </label>" + "<input id='myDateInput' type='text' data-dojo-type='dijit/form/DateTextBox' value='${DATE}' />" ); Also have dijit/form/DateTextBox in my require statements. Unfortunately the result is just a regular text input field with my date attribute in it, and not that drop down calendar. The html works when I just put it directly on my html page to test, so I'm not sure why it doesn't like the dojo. Thanks!
... View more
06-10-2015
09:05 AM
|
0
|
2
|
3640
|
POST
|
I sorta just came up with a workaround, right after making the post. when using the setContent method, at the end of the content I have the string: {$OBJECTID:myFunction} Then, within myFunction I can wire the click event with my button id to an anonymous function that prints test to the console. Seems rediculous but it works. Still don't get why my 2nd example in the original question doesn't just work.
... View more
06-05-2015
09:00 AM
|
0
|
0
|
633
|
POST
|
Hi, I have InfoWindow popups when users clicks a layer on my map. I am doing a lot of custom formating in these info windows and require having a html button in them. I can get the button to appear no trouble, but I can't get it's click event to work or call a function in my code. I've tried multiple approaches including using: <button id='myButton' onclick='myFunction();'>Label</button> when I create the button in the InfoTemplate.setContent method. Doing this tells my that my function is undefined. Also tried wiring the event in multiple location such as by using: on(dom.byId("myButton", "click", function() { console.log("test"); }); But nothing happens. Thanks for the help!
... View more
06-05-2015
08:53 AM
|
0
|
3
|
3312
|
POST
|
I am trying to build a Custom TOC / Legend with the ArcGIS Javascript API. I have tried many different prebuild widgets and other googlable things but none of them seem to work completely, or be compatible with my browser requirements of IE9. So I've been working on my own. The issue I am having now is accessing the Legend image/symbol/png of each layer within my ArcGISDynamicMapServiceLayer so that I can insert it in the HTML. I can see that there is a JSON thing for it within the REST page. How do I access this and use it within my JavaScript page? My JSON knowledge is small, but I'm sure once I learn this it will help with many other tasks. Thanks!
... View more
05-28-2015
09:31 AM
|
0
|
6
|
6620
|
Title | Kudos | Posted |
---|---|---|
1 | 05-21-2015 02:38 PM | |
1 | 08-15-2016 09:04 AM | |
1 | 01-23-2015 08:47 AM | |
1 | 08-04-2015 07:18 AM | |
1 | 05-20-2015 10:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|