Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #23416

undefined property, is not defined, is undefined - calling a value

From Cornelius Lange <coni@javas.invalid>
Newsgroups comp.lang.javascript
Subject undefined property, is not defined, is undefined - calling a value
Date 2014-03-05 13:40 +0100
Organization A noiseless patient Spider
Message-ID <lf7602$4r8$1@dont-email.me> (permalink)

Show all headers | View raw


hey,

does someone give a helping hand to find my blind spot -
in trying to call the value from "plaqueid"? (10516):

the (shortend) datastructure is:
----------------------------------
(
{
_layers:{
106:{
  options:{ ................. },
  _latlng:{lat:53.75272969271282, lng:-0.3258240222930908},
  _initHooksCalled:true,
  _leaflet_events:{ ................. },
  _popupHandlersAdded:true,
  _popup:{ ................. },  // end popup


  feature:{type:"Feature", geometry:{type:"Point", 
coordinates:[-0.32598227262497, 53.752937446804]}, 
properties:{plaqueid:"10516", plaquedesc:"<a 
href='./'>popupText</a><br><span class='id-poi'>10516</span>", 
colour:"white", imageid:""}},


  defaultOptions:{}, _leaflet_id:106,
  _map:{},
  _icon:({}),
  dragging:{ ................. }, // end dragging
  _shadow:null, _zIndex:50, edited:false
}	// end 106
}, // end _layers
  _initHooksCalled:true}
  ) // end console ... @ ...example3.js:191
----------------------------------
this datastructure was given by console.log(layers);
- from following "calling-place":






the calling code from example3.js
----------------------------------
function init() { ...
  map.on('draw:edited', function (e) {
     var layers = e.layers;
          alert(options.feature.plaqueid);    // here calling
     layers.eachLayer(function(layer) {    });    });
... }
----------------------------------
(shortend too)




I don't get further into the datastructur than "layers[106]" - by trying 
e.g. with

# console.log(layers); // ok, shown all.
# console.log(layers[106]); // ...undefined property layers[106] @ ...
# console.log(layers[106].feature); //
  - reference to undefined property this._animRequest @ ...leaflet.js:8
  - reference to undefined property layers[106] @ ... example3.js:191
  - layers[106] is undefined @ ... example3.js:191

# alert(Object.keys(e)); // layers,type,target
# alert(Object.getOwnPropertyNames(layers)); // _layers,_initHooksCalled
# alert(Object.keys(properties)); // properties is not defined


Where might be here the crux for me, to get this value?
What I've to see?




thanx for response,
coni

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

undefined property, is not defined, is undefined - calling a value Cornelius Lange <coni@javas.invalid> - 2014-03-05 13:40 +0100
  Re: undefined property, is not defined, is undefined - calling a value Christian Winter <thepoet_nospam@arcor.de> - 2014-03-05 14:23 +0100
    Re: undefined property, is not defined, is undefined - calling a value Cornelius Lange <coni@javas.invalid> - 2014-03-05 19:08 +0100

csiph-web