JavaScript Openlayers 3.5 undefined coordinate

I'm trying to get the coordinates of the Circle drawing in ol 3.5. I use the evt.coordinate function to get the coordinates, but I keep getting undefined. Here's a piece of my code:

this.boundingCircle = new ol.interaction.Draw({
    condition: ol.events.condition.always,
    source: source,
    style: new ol.style.Style({
        fill: new ol.style.Fill({
          color: [50,50,255,0.5]
        }),
          stroke: new ol.style.Stroke({
              color: [0,0,255,1]
          })
      }),
    type: 'Circle'
  });
  this.boundingCircle.on('drawstart', function(evt) {
    var coord = evt.coordinate;
    alert("coord " + coord);
  });

I ran out of ideas as to why I get ann undefined value for my coord variable. I tried using the same variable on my DragBox "boxstart" function and it works just fine, meaning I was able to get the coordinate of the initial click. Any help would be appreciated.

Answer:1

I'm generating a file dynamically in php like this : $attachment_url = "http://www.mysite.com/file.jpg"; header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-...

I'm generating a file dynamically in php like this : $attachment_url = "http://www.mysite.com/file.jpg"; header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-...

  1. force file download php
  2. force file download html
  3. force file download instead of opening in browser
  4. force file download javascript
  5. force file download not open in browser
  6. force file download
  7. force file download js
  8. force file download laravel
  9. force file download wordpress
  10. force file download vue
  11. force file download nginx server
  12. force file download content-disposition
  13. force file download link
  14. force file download sharepoint
  15. force file download chrome
  16. force file download node
  17. force file download ajax
  18. force file download dropbox
  19. force file download http
  20. force file download ios

I have a user control having a hidden field that gets set on the node click of a Tree View Hierarchy control. The underlying function for the click event of the Tree View is: function OnTreeClick(evt)...

I have a user control having a hidden field that gets set on the node click of a Tree View Hierarchy control. The underlying function for the click event of the Tree View is: function OnTreeClick(evt)...

  1. hidden field values javascript
  2. hidden field values
  3. hidden field multiple values
  4. clear hidden field values
  5. form hidden field value
  6. jotform clear hidden field values
  7. javascript get hidden field values
  8. how to get hidden field values in jquery
  9. html hidden field multiple values
  10. html hidden field assign values
  11. hidden_field_tag value
  12. rails hidden_field value

I'm trying to get the sum of all div's width on the page and show it on click in alert The problem I'm facing is when I click on the button again to show the sum the result return double and if I ...

I'm trying to get the sum of all div's width on the page and show it on click in alert The problem I'm facing is when I click on the button again to show the sum the result return double and if I ...

  1. diverticulitis
  2. divergent
  3. dividend
  4. diverticulosis
  5. diva cup
  6. divinity
  7. diversity
  8. divalproex
  9. division 2
  10. divine
  11. divorce
  12. divinity original sin 2
  13. dividend stocks
  14. dividing fractions
  15. dive bar
  16. divergent series
  17. diva
  18. diverticulitis diet
  19. divergent cast
  20. divine mercy chaplet

I want to trigger a blur within a keypress. IE10 works differently from Chrome/FF. It appears that IE will finish the keydown handler before calling the blur handler, whereas Chrome and FF will ...

I want to trigger a blur within a keypress. IE10 works differently from Chrome/FF. It appears that IE will finish the keydown handler before calling the blur handler, whereas Chrome and FF will ...

  1. trigger event from parent to child angular
  2. trigger event from business rule servicenow
  3. trigger event from workflow servicenow
  4. trigger event from parent to child react
  5. trigger event from javascript
  6. trigger event from iframe to parent
  7. trigger event from ui action servicenow
  8. trigger event from client script servicenow
  9. trigger event from another class c#
  10. trigger event from iframe
  11. trigger event from js
  12. trigger event from jquery
  13. trigger event from script servicenow
  14. trigger event from parent vue
  15. trigger event from mongodb
  16. trigger event from xaml
  17. trigger event from php
  18. trigger event from java
  19. trigger from event
  20. trigger event on element