OpenLayers3 overlay causes TypeErrors - openlayers-3

I'm trying to add an overlay layer to my map from some dynamically constructed data.
map.addLayer(new ol.Overlay({
position: locations[i],
positioning: 'center-center',
element: document.getElementById(screen.id)
}));
I'm assuming there is something wrong with the id of the element I'm passing as screen.id but that is an assumption because when I try it this starts spamming the console every time I attempt to interact with my now blank map.
ol.js:186 Uncaught TypeError: a.bf is not a function
(anonymous function) # ol.js:186
l.forEach # ol.js:80
l.bf # ol.js:186
l.xo # ol.js:407
(anonymous function) # ol.js:394
None of which means much to me. Can anyone shed light on what the error is trying to tell me?

Foolishly trying to add an overlay as a layer. Interestingly it doesn't throw an exception it just takes it and silently breaks the map.

Related

Script threw an uncaught JavaScript error: UIAElementNil is not a function (evaluating 'tableView.cells().logElementTree()')

This line of UI Automation code:
tableView.logElementTree();
gives this:
but then doing this
tableView.cells().logElementTree();
gives me this:
Script threw an uncaught JavaScript error: UIAElementNil is not a function (evaluating 'tableView.cells().logElementTree()')
This worked for another tableView I was working with so what's the difference here? And any suggestions on a fix?
tableView.cells() returns an array of table cells. You will need to pick a cell that you would like to print the log tree of either by name tableView.cells()["cellName"] or by index, tableView.cells()[0]. Or if you want to see the log tree of each cell you can print it in a loop.

Using angular.dart with Bootstrap yields Object #<Document> has no method 'getAttribute'

When using Angular.dart 0.9.10 with bootstrap 3.1.1, and compiling to Javascript, I get an ugly stacktrace attached below.
The stacktrace is printed in the console any time I for instance focus a textfield or enter some text.
This has worked previously, so I wonder if it is a bug with the shadow_dom implementation?
The app is currently quite simple and works correctly with Dartium. The same issue occurs after javascript compilation in both Firefox and Chrome.
It works when I remove below line from index.html
<script src="packages/shadow_dom/shadow_dom.debug.js"></script>
The stacktrace in pure text:
TypeError {stack: "TypeError: Object # has no method 'getAt…/packages/shadow_dom/shadow_dom.debug.js:2805:28)", message: "Object # has no method 'getAttribute'"}
message: "Object # has no method 'getAttribute'"
stack: "TypeError: Object # has no method 'getAttribute'↵ at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)↵ at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)↵ at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22↵ at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)↵ at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)↵ at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)↵ at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)↵ at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)↵ at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)↵ at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)"
__proto__: Error
constructor: function TypeError() { [native code] }
name: "TypeError"
stack: undefined
__proto__: d
"TypeError: Object # has no method 'getAttribute'
at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)
at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)
at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22
at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)
at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)
at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)
at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)
at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)
at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)
at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)"
I am not sure on the exact details why, but angular dart has a boostrap implementation:
https://github.com/akserg/angular.dart.ui
Likely, that one will work better for you.
Best Regards,
Paul

Highcharts legend js error

I am working with Highstock.js and prototype adapter. When I try to construct a stacked column chart on a specific data set I see the below js error
Uncaught TypeError: Cannot read property 'height' of undefined
(anonymous function)
(anonymous function)
HighchartsAdapter.each
Legend.handleOverflow
Legend.render
Legend.init
Highcharts.Legend
Chart.render
Chart.firstRender
Chart.init
(anonymous function)
obj.(anonymous function)
(anonymous function)
obj.(anonymous function)
Chart
I have reproduced that in http://jsfiddle.net/arjunbadarinath/f8JzU/6/, if I remove some stackings, the chart renders and also it renders when I remove the legend 'maxHeight' property, but removing this is not an option for us.
Can you please figure out what the problem is?
You need to replace color:['#ffffff'] with color:'#ffffff'
http://jsfiddle.net/f8JzU/7/

'undefined is not a function' from breeze insides, during basic setup

I assume it's extremely basic problem, but it caught me for two days, with no solution yet.
I'm creating a project with breeze, wrapped in requirejs, but I don't think that's the problem.
libraries loaded in dependencies are jquery, q, and datajs
breeze.config.initializeAdapterInstances({ dataService: "OData" });
var manager = new breeze.EntityManger('todo/Todos')
error Uncaught TypeError: undefined is not a function is thrown in second line above.
breeze.EntityManager is defined for sure, exception is thrown somewhere depeer in that function, stack trace from chrome below:
fire jquery.js?b=1394184954069:2913
self.add jquery.js?b=1394184954069:2959
jQuery.fn.jQuery.ready jquery.js?b=1394184954069:242
jQuery.fn.jQuery.init jquery.js?b=1394184954069:185
jQuery jquery.js?b=1394184954069:63
(anonymous function) main.coffee:186
context.execCb require.js:1635
Module.check require.js:871
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
Module.enable require.js:1142
Module.init require.js:779
callGetModule require.js:1169
context.completeLoad require.js:1549
context.onScriptLoad require.js:1656
Possibly there is a config line needed, I'm not aware of? Even when I removed the first line of two breeze.config.... error is still the same.
You are spelling Manager incorrectly
Manger - a long open box or trough for horses or cattle to eat from.
Manager - a person responsible for controlling or administering all or part of a company or similar organization.
Good luck!

How do I include jQuery Mobile in my Emberjs Rails application

Today I encounter a puzzling issue and after several hours of searching I am not able to find what is the problem. I am trying to include jquery mobile into my rails application. I have tried both manually referencing the library files and also using jquery_mobile_rails gem. Both method works as far as inserting the library into my application, however as soon as I add jquery mobile, my app no longer loads. When refreshing the page, it will not load. There are three errors in console:
1st:
Uncaught TypeError: Object <Ember.ArrayResourceController:ember141> has no method '_resourceRequest'
Jimux.appsMetaController.Em.ArrayResourceController.create.findAll
newFunc
(anonymous function)
(anonymous function)
(anonymous function) jquery.js:566
jQuery.extend.globalEval jquery.js:567
jQuery.ajaxSetup.converters.text script jquery.js:8107
ajaxConvert jquery.js:7992
done jquery.js:7628
callback jquery.js:8367
send jquery.js:8373
jQuery.extend.ajax jquery.js:7835
(anonymous function) jquery.js:5858
jQuery.extend.each jquery.js:613
jQuery.fn.extend.domManip jquery.js:5855
jQuery.fn.extend.append jquery.js:5628
jQuery.fn.extend.wrapAll jquery.js:5585
(anonymous function) jquery.js:5603
jQuery.extend.each jquery.js:613
jQuery.fn.jQuery.each jquery.js:243
jQuery.fn.extend.wrapInner jquery.js:5598
$.extend.initializePage jquery.mobile-1.2.0.js:9063
(anonymous function) jquery.mobile-1.2.0.js:9142
fire jquery.js:976
self.fireWith jquery.js:1084
jQuery.extend.ready jquery.js:408
DOMContentLoaded
2nd:
Uncaught TypeError: Cannot call method 'set' of undefined
Ember.Application.registerInjection.injection
(anonymous function)
(anonymous function)
visit
DAG.topsort
Ember.Application.Ember.Namespace.extend.runInjections
Ember.Application.Ember.Namespace.extend.initialize
(anonymous function)
fire
self.fireWith
jQuery.extend.ready
3rd:
GET http://localhost:3000/assets/images/ajax-loader.gif 404 (Not Found)
As soon as I remove //= require jquery.mobile-1.2.0 from application.js, my app works as expected again -- without any of the above errors. I am just wondering what could be happening here. I guess there may be some namespace collision, but I am not sure if this is the case and how to identify and fix it.
Any help with debugging this issue will be appreciated. If you are using Embeejs+jQueryMobile in a rails project, I would love to know how you are including the two libraries into your rails application, and if/how you are dealing with any conflict.
I am using Ember 1.0pre1, and a slightly modified version of ember-rest.
If I recall correctly, jQuery Mobile manipulates the DOM a fair bit. That would likely be problematic with Ember, as Ember expects to not have other libraries manipulating DOM elements that it is tracking views or bindings for.

Resources