This discussion is archived
2 Replies Latest reply: Nov 2, 2010 7:55 AM by omnicom RSS

Label - Event Not Fired

nojin Newbie
Currently Being Moderated
Hello All

The MOUSE_CLICK event for MVThemeBasedFOI is not being fired when i click on the Labels. Is it possible ?


OracleAS MapViewer Version: Ver11_1_1_4_B100706

My Code

var mapview;
var themebasedfoi;
var googlemap = new MVGoogleTileLayer();
function on_load_mapview()
{     
var baseURL = "http://192.168.5.116:7101/mapviewer";
var mapCenterLon = -9076545.5448055;
var mapCenterLat = 4011612.40113775;
var mapZoom = 17;
var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,3785);
mapview = new MVMapView(document.getElementById("map"), baseURL);
mapview.addMapTileLayer(googlemap);
mapview.setCenter(mpoint);
mapview.setZoomLevel(mapZoom);

themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','TEST.THEME_ADDRESS');
themebasedfoi.enableLabels(true);
themebasedfoi.setQueryWindowMultiplier(1.0);
themebasedfoi.setVisible(true);
themebasedfoi.attachEventListener(MVEvent.MOUSE_CLICK, foiaddressClick);
themebasedfoi.setBringToTopOnMouseOver(true);
mapview.addThemeBasedFOI(themebasedfoi);
themebasedfoi.setQueryParameters(48);

mapview.display();
}

function foiaddressClick()
{
alert("Address")
}     


My Theme Definition


<?xml version="1.0" standalone="yes"?>
<styling_rules>
<hidden_info>
<field column="ID" name="ADDRESS"/>
</hidden_info>
<rule>
<features style="M.DOT"> ( sdo_filter(ORIENTED_GEOM,(select geom from user_boundary where USERID=: 1),'QUERYTYPE=WINDOW') ='TRUE' ) </features>
<label column="STREETNUM" style="T.ADDRESS"> 1 </label>
</rule>
</styling_rules>


My Style Definition


<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc/>
<g class="text" float-width="2" float-color="#FFFFFF" style="font-style:plain;font-family:Serif;font-size:12.0u.s. foot;text-align:center;fill:#0099FF"> Hello World!
<opoint halign="center" valign="middle"/>
<text-along-path valign="baseline"/>
</g>
</svg>


Thanks in advance

Edited by: nojin on Mar 22, 2012 11:01 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points