jbrack321

Members
  • Content count

    10
  • Joined

  • Last visited

About jbrack321

  • Rank
    Junior Member

Profile Information

  • Gender
    Not Telling
  1. Dynamically Apply Markers

    Sumedh, Thanks for your assistance. However, I am having a difficult time calling markers upon a condition. Can anyone assist me with the following code below? I am trying to make a marker appear if $rs1['datap'] value is between 10 & 900. $strQuery = "select state, sum(datap) as datap from (select tracker.state, tracker.data datap from tracker union all select cable_intrusion.state, cable_intrusion.data datap from cable_intrusion union all select fibertesting.state, fibertesting.data datap from fibertesting) as datap group by state"; $result = mysql_query($strQuery) or die(mysql_error()); # Check if we've records to show if ($result) { # Iterate through each record while($rs1= mysql_fetch_array($result)) { if ($rs1['datap']>='10'){ if ($rs1['datap']<='900'){ ***call marker*** Thanks lhardee
  2. Dynamically Apply Markers

    Hi Sumedh, The code you attached displays markers. However, what I am trying to do is show markers conditionally. Is this possible? For example: $strQuery = "select state, sum(datap) as datap from (select tracker.state, tracker.data datap from tracker union all select cable_intrusion.state, cable_intrusion.data datap from cable_intrusion union all select fibertesting.state, fibertesting.data datap from fibertesting) as datap group by state"; $result = mysql_query($strQuery) or die(mysql_error()); # Check if we've records to show if ($result) { # Iterate through each record while($rs1= mysql_fetch_array($result)) { if ($rs1['datap']>='10'){ if ($rs1['datap']<='900'){ $strXML .="<markers>"; $strXML .="<definition>"; $strXML .= "<marker id='1' x='709.31' y='69.94' label='jump kit' labelPos='top' />"; $strXML .="</definition>"; $strXML .="<shapes>"; $strXML .= "<shape id='myCustomShape' type='image' url='base.png' labelPadding='12' />"; $strXML .="</shapes>"; $strXML .="<application>"; $strXML .= "<marker id='1' shapeId='myCustomShape' link='n-http%3a%2f%2examplewebpage'/>"; $strXML .="</application>"; $strXML .="</markers>"; $strXML .= "<styles>"; $strXML .= "<definition>"; $strXML .= "<stylename='markerAnim' type='animation' param='_y' start='0' duration='1.2' easing='bounce' />"; $strXML .= "</definition>"; $strXML .= "<application>"; $strXML .= "<applytoObject='MARKERS' styles='markerAnim' />"; $strXML .= "</application>"; $strXML .= "</styles>"; } } Thanks !!! lhardee
  3. Dynamically Apply Markers

    Hi Sumedh, Thanks for your reply. I checked out your suggestions and cannot seem to find a solution. Below is an example of some markers I created. However I only want to call those markers if ($rs1['datap']= a certain value. I cannot figure out what I am doing incorrectly to call the markers properly. Any help would be appreciated. $strXML .= "<markers>"; $strXML .= "<shapes>"; $strXML .= "<shape id='myCustomShape' type='image' url='Resources/Google_Maps_Marker.png' labelPadding='12' />"; $strXML .= "</shapes>"; $strXML .= "<definition>"; $strXML .= "<marker id='1' x='709.31' y='69.94' label='example a' labelPos='top' />"; $strXML .= "<marker id='2' x='320.11' y='200.54' label='example b' labelPos='top' />"; $strXML .= "</definition>"; $strXML .= "<application>"; $strXML .= "<marker id='1' shapeId='myCustomShape' link='n-http%3a%2f%2example1webpage.php>"; $strXML .= "<marker id='2' shapeId='myCustomShape' link='n-http%3a%2f%2example2webpage.php' />"; $strXML .= "</application>"; $strXML .= "</markers>"; $strXML .= "<styles>"; $strXML .= "<definition>"; $strXML .= "<style name='markerAnim' type='animation' param='_y' start='0' duration='1.2' easing='bounce' />"; $strXML .= "</definition>"; $strXML .= "<application>"; $strXML .= "<apply toObject='MARKERS' styles='markerAnim' />"; $strXML .= "</application>"; $strXML .= "</styles>"; ------------------------------------------------------------------------------------------------------ $strQuery = "select state, sum(datap) as datap from (select tracker.state, tracker.data datap from tracker union all select cable_intrusion.state, cable_intrusion.data datap from cable_intrusion union all select fibertesting.state, fibertesting.data datap from fibertesting) as datap group by state"; $result = mysql_query($strQuery) or die(mysql_error()); # Check if we've records to show if ($result) { # Iterate through each record while($rs1= mysql_fetch_array($result)) { if ($rs1['datap']>='10'){ if ($rs1['datap']<='900'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http://examplewebpage.php' />"; } } Thanks, lhardee
  4. Dynamically Apply Markers

    Hello, I am very new to Fusion Maps and hope someone can assist. I would like to dynamically apply makers based on data base values. Through the tutorials I see that I can apply definitions of the markers only and then apply <application> to call the marker. I am using the dataXML method and PHP. Can someone provide an example of this for me? I cannot get this to work. Thanks, lhardee
  5. Setting Multiple Links

    Hello, I found what I was looking for. I overlooked it in FusionChart help files. By placing n- in front of the link, it will open in a new window. if ($rs1['datap']>='10000'){ if ($rs1['datap']<='90000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/trackerlist.php' />"; } } if ($rs1['datap']>='1000'){ if ($rs1['datap']<='9000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/precautionlist.php' />"; } } if ($rs1['datap']>='10'){ if ($rs1['datap']<='900'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/cable_intrusionlist.php' />"; } } if ($rs1['datap']>='100000'){ if ($rs1['datap']<='900000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/cable_intrusionlist.php' />"; } } JB
  6. Setting Multiple Links

    Hello, I should have clarified...I am new to Fusioncharts & Maps. I am actually using FusionMaps software but am unable to access the FusionMaps forum. I've created a trouble ticket and am waiting on a solution by FusionChart support. In the mean time, I thought I would see If I could find an answer to my problem in this forum. I was able to find an answer (see below) if ($rs1['datap']>='10000'){ if ($rs1['datap']<='90000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/trackerlist.php' Target='_blank' />"; } } if ($rs1['datap']>='1000'){ if ($rs1['datap']<='9000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/precautionlist.php' Target='_blank' />"; } } if ($rs1['datap']>='10'){ if ($rs1['datap']<='900'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/cable_intrusionlist.php' Target='_blank' />"; } } if ($rs1['datap']>='100000'){ if ($rs1['datap']<='900000'){ $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/cable_intrusionlist.php' Target='_blank' />"; } } Everything works as I'd hoped with the exception of the link opening in a new window. I thought target='_blank' would do the trick. However, it doesn't work. Any advice would be a great help. Thanks, JB
  7. Setting Multiple Links

    Thanks Sanjukta JB
  8. Setting Multiple Links

    Hello, Is it possible to set a different link dependent upon the value range? Something like an if statement: $strXML .= "<color minValue='10' maxValue='90' displayValue='Cable Intrusion' color='D64646' />"; $strXML .= "<color minValue='90001' maxValue='900000' displayValue='Multiple Events' color='FFFF33' />"; $strXML .= "<color minValue='10000' maxValue='90000' displayValue='Fiber Events' color='8BBA00' />"; if ($result) { # Iterate through each record while($rs1= mysql_fetch_array($result)) { $strQuery ="select * from fcmap_master where Internal_Id='" . $rs1['state'] . "'"; $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "' link='' www.link#1.com />"; } Thanks, JB
  9. That did the trick !!!!! Thanks so much. JB
  10. Hello, I'm having trouble with select statement that combines 2 columns from 2 tables (summing column2 for all similar states in column1). 1st table = tracker column1 = state column2 = data example below: state | datap TX | 1000 ---------------------------- 2nd table = precaution column1 = state column2 = data example below: state | datap TX | 100 LA | 10000 --------------------------- Result should be: state | datap TX | 1100 LA | 10000 I'm hung up on the following select statement (close but no cigar) $strQuery = "SELECT distinct tracker.state, sum(tracker.data) datap FROM tracker group by state UNION ALL SELECT distinct precaution.state, sum(precaution.data) datap FROM precaution group by state"; Result of code above does not combine similar states and their related data For example, code above does: state | datap TX | 100 TX | 1000 LA | 10000 Any help would be appreciated. Thanks, JB [/size]