HTML5 API - Heat Layer Points Not Working

Hi everyone,
Really weird issue this, and I am honestly at a loss to explain what's going on, so hopefully someone can spot my mistake!
I want to overlay a density-based heat map over a map of Britain, based on longitude/latitude points stored in OBIEE columns. I have copied and pasted some of the code (modifying it for my needs) from the SampleApp v406 "dynamic heat layer" demonstration.
My "showMap(darray)" function is what is responsible for building and displaying the map. darray in this case is an 2-dimensional array containing all the OBIEE data in [row number][column number] format which is fed in via a narrative view. Note that mapview, heatLayer and eventsLayer are global variables defined in the main script body. Below is the code:
function showMap(darray) {
   var baseURL  = "http://"+document.location.host+"/mapviewer";
   mapview = new OM.Map(document.getElementById("map"), { mapviewerURL:baseURL });
   mapview.addLayer(new OM.layer.ElocationTileLayer("background"));
   var marker = new OM.style.Marker({src: "/mapviewer/icons/BALL_sel.png", width:7, height:7});
   var heatStyle = getStyle();
  heatLayer = new OM.layer.VectorLayer("heatLayer",
            def:
                type: OM.layer.VectorLayer.TYPE_LOCAL
                renderingStyle: heatStyle
  addPoints(darray, heatLayer);
  mapview.addLayer(heatLayer);
eventsLayer = new OM.layer.VectorLayer("eventsLayer",
            def:
                type: OM.layer.VectorLayer.TYPE_LOCAL
                renderingStyle: marker
  addPoints(darray, eventsLayer);
  mapview.addLayer(eventsLayer);
  // Set the initial map center and zoom level
  var mapCenterLat = 51.14076;
  var mapCenterLon = 0.88016;
  var mapZoom = 8;
  var mpoint = new OM.geometry.Point(mapCenterLon,mapCenterLat,8307);
  mapview.setMapCenter(mpoint); 
  mapview.setMapZoomLevel(mapZoom);
  console.log(heatLayer);
  mapview.init();
Here is the getStyle() function definition, it simply returns a style for the heat map to use.
function getStyle(){
  var colors = ["#C6DBEF","#6BAED6","#008fff","#00abff","#00d5ff","#00ffff","#00ff7f","#00ff00","#7fff00","#ffff00","#ffd500","#ffab00","#ff7f00","#ff5600","#ff2b00", "#ff0000", "#A50F15"];
  var config = {
    spotlightRadius:25,
    lengthUnit:"pixel",
    colorStops: colors,
    opacity:0.65,                 
    sampleFactor: 1
  var heatStyle = new OM.style.HeatMap(config);
  return heatStyle;
and here is the addPoints(darray) function which is responsible for plotting points on the layer:
function addPoints(darray,layer) {
  /*lat,long,estb,metric*/
  for (i=0;i<darray.length; i++) {
      var fid = i;
      var mpoint = new OM.geometry.Point(darray[i][4], darray[i][3], 8307);
      var f_attr = {attributes :{"Car Number":darray[i][0], "Event":darray[i][2], "Time":darray[i][1]}};
      var feature = new OM.Feature(fid,mpoint,f_attr);
      layer.addFeature(feature);
I apologise for the code dump, but I thought it would be necessary to help troubleshoot.
My issue is that any layer using the "marker" style displays the points in the correct place, but the heat layer, which uses the "heatStyle" style, stacks all of its points at 0,0 which is somewhere just off the west coast of Africa! You'll notice the call to console.log(heatLayer), investigating this reveals that the correct GPS coordinates are being stored in the heat layer's feature array, it's just for some reason rendering them all at 0,0. This is what normally happens if you use an invalid SRID and it doesn't know where to put them on the map (if I change mpoint in addPoints() to use -1 as a SRID for example, then it does the same thing to the eventsLayer layer), but both layers use the same function. I have torn apart my code several times trying to understand why it's doing this, and compared it to the code in the SampleApp v406 demo and it's identical! The only difference is that I've modified getStyle() to return a static definition since I'm not allowing my users to modify the heat layer style. I've also got another visualisation with the same heat style definition and it works fine, though that is not based on a world-map but a custom one.
I've also tried clearing all caches, including the presentation layer and mapviewer server, as well as my browser's cache, and it's still not working.
EDIT: I have also discovered that any functions called from heatLayer, such as setVisible(true/false), produces a javascript error in oraclemapsv2.js "ReferenceError: layer is not defined", but only if the call is made OUTSIDE the showMap function. It looks like, for whatever reason, heatLayer works fine until showMap() is finished, and then it suddenly stops working? Remember that heatLayer is a global variable, so it is not a scope issue. What is going on?! Also, calling console.log(heatLayer) in the same function as my setVisible() call shows that heatLayer is still defined and still contains the same data, it's just that oraclemapsv2.js no longer recognises it. Is this a bug or something?
If anyone can identify what I've done wrong, I would be extremely grateful!
Thanks,
Richard

Hi Mark,
Can you post the create index command, as well as the contents of user_sdo_geom_metadata for the point layer?
Also, can you post the results of doing a select count(*) from the index table as well as select count(*) from the point table?
Thanks,
dan

Similar Messages

  • Pointer not working properly in mozilla browser alone wat to do??????

    pointer moves around the page but unable to select using the pointer.each time i had to press backspace to type something on the search box.i cannot get a dropdown box in gmail to sign out because of pointer not working properly.how do i rectify it??????????

    You may have switched on caret browsing.
    *http://kb.mozillazine.org/accessibility.browsewithcaret
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    *Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"
    *http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • For some reason the masking layer is not working in my CS6. I know I have all the settings correct!

    For some reason the masking layer is not working in my CS6. I know have everything set correctly! Please help.

    Hard to guess on this type of question at you are not offering any tip on what you are doing.  A screen shot might help to see how you have things set.

  • JavaScript API Reference: AdfRichTable .getWidth not working.

    Hello, I need to write a JAVASCRIPT function that returns the width of table every time is called. The table "id" is 't1'.
    My first version of the function was something like this:
              function getElementWidth(event) {
                  var tElem = document.getElementById('t1::ch');
                  var tWidth = tElem.style.width;
                  component = event.getSource();
                  AdfCustomEvent.queue(component, "customEvent",{width : '' + tWidth},true);
                  event.cancel();
              }The function works fine, still I don't like it because making use of 't1::ch' (which is actually a div inside a more elaborate css/html/javascript construct) is more like a hack.
    My next idea was to write another function, making use of AdfPage.PAGE.findComponent.
    The function should be something like this:
              function anotherFunction(event) {
                 var table = AdfPage.PAGE.findComponent('t1');
                 alert(table);
                 alert(table.getWidth());
              }The firtst alert window shows: +AdfRichTable [oracle.adf.RichTable] id=t1+
    The second alert window shows: null
    Any ideea why the getWidth function is not working accordingly ?

    I've changed the script.  I now create my path layer using the below function.  However, even after explicitly changing the ruler units to PIXELS, the paths I create all seem to be measured in POINTS.  Even if the original ruler unit is PIXELS this still happens.  Is there any way around this (that is backwards compatable)?
    function createPathLayer(title, subPathArray)
        var docRef = app.activeDocument;
        var originalUnit = app.preferences.rulerUnits;
        alert("Orig units " + originalUnit);
        app.preferences.rulerUnits = Units.PIXELS;
        var myPathItem = docRef.pathItems.add(title, subPathArray);
        alert("New units " + Units.PIXELS);
        app.preferences.rulerUnits = originalUnit;

  • Import psd with layer groups in AE CC - "Retain Layer Sizes" not working

    Hi All,I created some shape layers in Photoshop and grouped them separately. Then imported this psd file into AE. I checked "Retain Layer Sizes" however all the layer-groups have the same size bounding box as document size instead of at the layer size. If I ungroup them in Photoshop and then import it, the "Retain Layer Sizes" just worked fine.
    Environment:
    Mac OS X Yosemite 10.10.2
    Photoshop CC 2014
    After Effects CC 2014
    in Photoshop:
    in After Effects:

    Thank you Rick!
    Yes I noticed that. I wonder if it is possible that to make bounding box to extend to only the dimensions of the subsequent layers instead of document size? Now you can see that the anchor points are not located at right place. The reason I grouped layers in Photoshop is that I want to transform or animate one group at same time.
    Sorry for my poor English

  • Play book charge point not working

    Dear Team,
    The charge point is not working and total battery is down now, am from India and living in Trivandrum. There is no expert too who can address the issue. Can Playbook be charged through some alternate point.
    Pl help me.

    hey ara,
    it's not about a disc that will work like all pressed discs out there.
    it's just that most dual layer discs are dvd+r and most set-top dvd players can only read dvd-r discs.
    if you want to look at your burned dual layer discs, look at them in a computer environment.
    the lack of compatibility has nothing to do with DVDSP.
    Mikey

  • Access point not work correctly

    Hello everybody, I have a problem in my BlackBerry Passport. I can't turn on "access point" function,this function not work. Does this function work in the future OS updates?
    P.S access point give your internet from the mobile network to your WiFi

    Hotspot does work on all versions of BlackBerry 10 OS and all BB10 models. It is, however, controlled by your carrier. If it won't turn on you have one of several possible problems:
    1) Your mobile data is off or not working.
    2) You need to have Hotspot provisioned on your account by your carrier.

  • CS4 extended Layer styles not working

    Running CS4 extended on Vista64, Corei7 quad @2.9 GHz, 8 Gig Ram and nVidia quadro FX 1700. I can not get layer styles to work in documents that originated in CS3 extended. If I start a new document they work.
    Any thoughts?
    Thanks!

    Well, I ended up copying all of the layers from the old PSD to a CS4 psd and it worked. Since it is a web page it had a lot of layers and it was a major pain in the hooey... but it did work.

  • Embedded FLV Cue Points not working

    I am updating a project which uses an FLVPlayback component to play and navigate FLV videos using embedded Navigation cue points. The FLVs were originally encoded using an older version of AME, CS4 possibly. When trying to replace an FLV with a new one encoded using AME CS6, the embedded cue points do not work. Testing in Flash I get "VideoError: 1003: Invalid seek" when attempting to use "seekToNavCuePoint".
    Comparing the two FLVs using Premiere shows no recognizable differences between them. They are the same format, their cue points are named identically, all are designated as Flash Cue Points, and all set to type "Navigation".
    Digging into the FLV data, I've found that the cue point descriptions are formatted quite differently and I'm wondering if this is the source of the problem:
    Excerpt from the original FLV (AME CS4?):
         <rdf:li>
          <rdf:Description
           xmpDM:trackName="AME Markers"
           xmpDM:frameRate="f254016000000">
          <xmpDM:markers>
           <rdf:Seq>
            <rdf:li
             xmpDM:startTime="9323149248000"
             xmpDM:name="q1in"
             xmpDM:type="FLVCuePoint"
             xmpDM:cuePointType="Navigation"/>
    Excerpt from the new FLV (AME CS6):
         <rdf:li>
          <rdf:Description
           xmpDM:trackName="FLVCuePoint"
           xmpDM:trackType="FLVCuePoint"
           xmpDM:frameRate="f15">
          <xmpDM:markers>
           <rdf:Seq>
            <rdf:li>
             <rdf:Description
              xmpDM:startTime="550"
              xmpDM:name="q1in"
              xmpDM:cuePointType="Navigation">
             <xmpDM:cuePointParams>
              <rdf:Seq>
               <rdf:li
                xmpDM:key="marker_guid"
                xmpDM:value="2c2c8be0-75af-47d6-8938-4a365e33a550"/>
              </rdf:Seq>
             </xmpDM:cuePointParams>
             </rdf:Description>
            </rdf:li>
    Completely stumped here, any ideas appreciated!

    More digging into the new FLV shows that while XMP defines the cue points as type "navigation", there is prior data in the file that defines all the cue points as "event". This makes sense, because my SWF is correctly listening for and reacting to an "end" cue point in the FLV, but will not seek to any cue point since they are all set as "event".
    Copying and pasting from Notepad++:
    cuePoints       0       name   q1in  time @BYûçl‹D  type   event 
      1       name   q1out  time @JÜ(õ\  type   event 
      2       name   q2in  time @V£¥ãS÷Ï  type   event 
      3       name   q2out  time @^/ Ÿ¾w  type   event 
      4       name   q3in  time @_Oß;d  type   event 
      5       name   q3out  time @nE™™™™š  type   event 
      6       name   q4in  time @s G® zá  type   event 
      7       name   q4out  time @vNÄ›¥ãT  type   event 
      8       name   q5in  time @w¢Ù ‡+   type   event 
      9       name   q5out  time @zw×
    =p¤  type   event 
      10       name   end  time @€ð bMÒò  type   event 
    Any idea why AME is doing this?

  • Cue points not working

    Hai am tying to inject the cuepoints in strobe mediaplayer version 2.0.Its not Working ,Same code is working in another version(1.6).Whats the problem kindly guide me

    More digging into the new FLV shows that while XMP defines the cue points as type "navigation", there is prior data in the file that defines all the cue points as "event". This makes sense, because my SWF is correctly listening for and reacting to an "end" cue point in the FLV, but will not seek to any cue point since they are all set as "event".
    Copying and pasting from Notepad++:
    cuePoints       0       name   q1in  time @BYûçl‹D  type   event 
      1       name   q1out  time @JÜ(õ\  type   event 
      2       name   q2in  time @V£¥ãS÷Ï  type   event 
      3       name   q2out  time @^/ Ÿ¾w  type   event 
      4       name   q3in  time @_Oß;d  type   event 
      5       name   q3out  time @nE™™™™š  type   event 
      6       name   q4in  time @s G® zá  type   event 
      7       name   q4out  time @vNÄ›¥ãT  type   event 
      8       name   q5in  time @w¢Ù ‡+   type   event 
      9       name   q5out  time @zw×
    =p¤  type   event 
      10       name   end  time @€ð bMÒò  type   event 
    Any idea why AME is doing this?

  • Inverted layer mask not working

    I havent used PS much of late but in CS6 when layer masking the technique I used to use doesnt seem to work anymore.  I would have two layers.  The top layer I would put a layer mask.  Then I would select all and delete hit the delete button so the mask would turn black and invert.  Then instead of painting black over white to reveal the bottom layer I would paint white over black to bring my top layer back.  I liked doing it like this.   But its not working now.   When I paint with white on the black mask nothing happens?? I tried inverting in the properties but makes no diff.   What am I doing wrong?

    Check the blending mode on your brush.  It may be set to darken or some other blend mode than normal.  As a side note, you can invert a layer mask be making sure it's selected and press ctrl/cmd-i. You can also create a mask where everything is hidden by pressing alt/opt then clicking on the add layer mask icon in the layers pallet.

  • Flash Proffession CC 2014 HTML5 Canvas drag and drop not working

    Hi,
    I am making drag and drop in Flash professional CC 2014 using canvas and it is working fine on desktop but same when I am testing in Android tablet it is not working.  Can any one please advise how to make drag and drop application from Flash CC 2014 which will work on both web/pc desktop HTML5 canvas and all android devices.
    Thanks

    I just discovered something.  What I meant above is that I cannot drag and drop files from the "Media Browser" panel.  Surely that should be possible.  After all, that is how you browse your music files.  If I first double click a file in the browser so that it opens in the "Files" panel, I can then drag and drop files from there.  That is ridiculously tedious however because that opens the wave file and closes the "CD Layout" panel.  I then have to reopen the "CD Layout" panel before I can drag and drop a file.  I'm pretty sure you should be able to simply drag and drop from the Media Browser.  Any comments from Adobe?

  • Twitter API and Edge Animate not working

    Hi,
    I have watched great video about using Twitter API in Edge Animate on Adobe TV and I thought I would give it a go.
    I followed the steps and unfortunately it's not working for me.... Not even an error message when tested in a browser, nothing...
    Here's my code for compositionReady:
    try {
        // Read tweets, set number of tweets to display
        var 0 = { username: "adobeedge", count: 4};
        var twitterUrl = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+o.username+"&count="+o.count;
        // AJAX function for communicating to Twitter API
        $.ajax( {url: twitterUrl, dataType: "jsonp"} )
            .success(function(data) {
            $.each(data, function(index, item) {
                var itemRenderer = sym.createChildSymbol("itemRenderer", "tweetContainer");
                itemRenderer.$("tweet").html( item.text );
                itemRenderer.$("image").css("background-image", "url("+item.user.profile_image_url+")");
    catch(error) {
            alert("Error: "+error.toString());
    Any suggestions?

    Please, could you replace "adobeedge" by "adobeanimate".
    Before:
    After:
    try {
                var o = { username: 'edgeanimate', count: 4 };
                var twitterUrl = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name='+o.username+'&count='+o.count;
                $.ajax({url: twitterUrl, dataType: 'jsonp'})
                    .success(function(data) {
                       $.each(data, function(index, item){
                            var itemRenderer = sym.createChildSymbol("itemRenderer", "tweetContainer");
                            itemRenderer.$('tweet').html( item.text );
                            itemRenderer.$('image').css( "background-image", "url("+item.user.profile_image_url+")" );
                            itemRenderer.play( index * -100 );
    catch(error) { alert("Error: "+error.toString()); }

  • Trackpad/point not working after keyboard removal

    Earlier today I opened up my T510 for maintanence. In doing so, I removed the keyboard. After putting everything back together, the trackpoint/trackpad did not work. That includes the the **bleep**-mouse, trackpad, and all mouse buttons. The trackpad wasn't even removed, but I guess the data connection for that goes through the rest of the keyboard (?).
    I took the keyboard out several times to make sure the connection was secure and inspect for physical damage. There was nothing.
    The obvious thing to do here is replace the keyboard and desperately hope that the problem is not with the mobo connector, but the problem is sufficently strange (keyboard working but not mouse) thatI figured it would be worth posting here to see if anyone has any insight. 
    Solved!
    Go to Solution.

    Solved.
    As I mentioned in the last post, the trackpad connects to the mobo through the cable labled as a speaker wire in the manual (this can be easily seen after removing the keyboard bezel/trackpad from the machine). There is a small latch to hold this cable in place on the mobo end. I had mixed up the secured and unsecured states for this latch, which apparently broke the connection. Fixed that now and everything works.
    It's probably worth explicitly pointing out that the **bleep**-mouse and mouse buttons on the keyboard do seem to be depenent on the trackpad being properly plugged in, despite having a seperate connection to the mobo.

  • Extension Point not working for extending Columns in sap.m.Table

    Hi Colleagues,
    We are recently developing a UI5 application and we tried to extend the Fragments and views as per wiki.
    Below is the code :
    <core:View xmlns:l="sap.ui.layout" xmlns:core="sap.ui.core"
      xmlns="sap.m" controllerName="ui.s2p.srm.sourcingcockpit.view.S1">
      <Page id="page" class="marginBoxContent" showNavButton="true"
      navButtonTap="_navBack">
      <content>
      <l:Grid class="" defaultSpan="L12 M12 S12">
      <Table id="demandsTable" mode="MultiSelect" growing="true"
      updateFinished="handleUpdateFinished" growingFinished="onListLoad"
      growingThreshold="20" items="{/UnsourcedDemandCollection}">
      <columns>
      <Column id="col_sos" minScreenWidth="tablet" demandPopin="true">
      <Text text="{i18n>col_sos}" />
      </Column>
      <core:ExtensionPoint id="extDemandColumn">
      <Column id="col_attach" minScreenWidth="tablet"
      demandPopin="false" width="4%">
      <Text text="{i18n>col_attach}" visible="false" />
      </columns>
      <items>
      <ColumnListItem>
      <cells>
      <Link
      text="{parts:[{path:'ObjectID'}, {path:'NUMBER_INT'}],formatter:'.formatObjectIdNumberInt'}"
      wrapping="true" />
      <core:ExtensionPoint name='extDemandList' />
      <l:HorizontalLayout>
      <l:content>
      <core:Icon src="sap-icon://attachment">
      </core:Icon>
      <Text text="({AttachmentCount})" class="paddingRightLeft" />
      </l:content>
      </l:HorizontalLayout>
      </cells>
      </ColumnListItem>
      </items>
      </Table>
      </l:Grid>
      </content>
      </Page>
    </core:View>
    In the above code we have specified two extension points. While extending it through Component.js, extDemandList works fine, but extDemandColumn does not work.
    Please let me know the way through which we can extend the columns in table and similarly formelements in FormContainer control.
    Thanks in advance.
    Best Regards,
    Ankit Jain

    I think you have defined 'id' instead of 'name' for the extDemandColumn
    <core:ExtensionPoint id="extDemandColumn">
    Regards,
    Jason

Maybe you are looking for

  • Will an external hard drive I used with my macbook work with ipad?

    I am going to get ipad 3, I wanted to ask though, I had a macbook and three different external hard drives that I backed up over 500 gb of movies, tv shows, music on from the macbook, will they work on an ipad if I hook them up to the usb drive or ar

  • My ipod wont respond to iTunes

    For some reason my ipod works perfect on its own, but as soon as i plug it into my computer i dont get a response from it. It doesnt even turn itself on, and i have to open iTunes by clicking the icon on the desktop. What is wrong?

  • Where can I get a recipe card template?

    The Avery website does not have iMAC templates like the ones I used when I was PC for 4 x 6 recipe cards and Pages does not include such a template.....can you imagine that? 

  • Transformation in sap bw 7.0

    i am learning sap bw. i would like to know full details on the topic  transformation in sab bw 7.0 Please search the forum before posting a thread. Edited by: Pravender on Jul 8, 2010 10:57 AM

  • Advanced Debugging in OUAF v4.0 and above

    Hi All, I understand that one of the enhancements in OUAF v4.0 and above is the feature of advanced debugging that helps programmers optimize code by providing detailed debugging information about the programming objects. Can anyone point me to how I