kmorse

Members
  • Content count

    19
  • Joined

  • Last visited

About kmorse

  • Rank
    Junior Member
  1. We used a php script to update the map xml data, which included links. Click on a state (United States) or a county (Colorado) to see a details page. That data was supplied and updated periodically by the Associated Press news service. The php script extracted the data needed to update the xml and the details pages. This work was done by the DenverPost.com online team of Joe Murphy, Michelle Whitman, Doug Connaroe and Keith Morse.
  2. Fusion maps - automatic refresh?

    Thank you! That works.
  3. Fusion maps - automatic refresh?

    Hi -- here's what we're using to display one of the maps ( on http://www.denverpostplus.com/ElectionMaps/LiveExamples/ele-iframe-home.html): <div id="map1div"> FusionMaps. </div> <script type="text/javascript"> var map1 = new FusionMaps("../Maps/FCMap_Colorado.swf", "Map1Id", "300", "187", "0", "0" ); map1.setDataURL("colo2008.xml" ); map1.setTransparent(true); map1.render("map1div" ); //Attempt to get the refresh working: self.setInterval('mapr(map1)', 5000) function mapr(map) { map.setDataURL("colo2008.xml" ); //map.setTransparent(true); //map.render("map1div" ); } </script> When that runs, it returns a javascript error: Error: mapObj.setDataURL is not a function Source File: http://www.denverpostplus.com/ElectionMaps/JSClass/FusionMaps.js Line: 143 So, I'm wondering: Can you send me some example code of this refresh script done correctly? Either that or could you tell me what I'm doing wrong? Thanks~
  4. Fusion maps - automatic refresh?

    Hi -- the server we're on has php and python available. Can you tell me how to accomplish the refresh with both backend and frontend (javascript) methods?
  5. I have Fusion maps that will be updated periodically Tuesday night during the U.S. election. Is there any code I could include in the xml file or the html file that would automatically refresh the xml data without the user having to refresh the Web page?
  6. I am using links to web pages in the xml of a fusion map. I know that the "n-" prefix opens the link in a new window and the lack of the "n-" link opens the link in the same window. My question: is there a way to render a link that opens the page in "parent window"? In HTML, it would be something like this: A HREF="target2.html" Thanks in advance for your help. Keith Morse Denver Post
  7. I have a fusion map which, of course, references an xml data file. I keep the xml date file and the html file in the same folder on the same server. However, if I want to place the xml data file on a different server (this file will be rewritten about once a minute and having it on a different server would accelerate the update process), is this possible? I tried it but got an "error reading data" message. Here is the line I placed in the HTML file where I wanted to reference the fusionmap xml file: map.setDataURL("http://denverelections.com/race/2008/president/colorado/fusionmaps.xml"); Is there anything about the way I have written that URL that might have caused the error? If not, I will either just write the to the file in the same folder as the html file where everything works fine and use this call to the map file: map.setDataURL("colo2008.xml"); Thanks in advance, Keith Morse Denver Post
  8. Arindam, Thank you very much. That worked. I now have the option of making the canvas and border transparent. Next question: Is it possible to reduce the size of the canvas or remove it altogether? I would like to move some other elements on the page closer to the actual map. Thanks in advance, Keith Morse Denver Post
  9. I have two maps on a page: I would like the color of the map canvas to match the color of the surrounding page's background. I saw a discussion on the Fusion Charts forum and tried using the canvasBaseColor and showCanvasBase attributes, but was not able to change the color from white. I put the attribute calls at the top of the map's xml file like this: map borderColor='FFFFFF' baseFontColor='FFFFFF' connectorColor='000000' showLabels='0' fillAlpha='70' hoverColor='FFFFFF' showBevel='0' showToolTip='1' showMarkerToolTip='1' markerBgColor='FF0000' canvasBaseColor='000000' canvasBgColor='000000' showCanvasBg ='1' showCanvasBase='1' Do these attribute calls belong at the top or near the bottom, where I have the style definitions such as? styles> definition> style type='animation' name='animX' param='_xscale' start='0' duration='1' /> style type='animation' name='animY' param='_yscale' start='0' duration='1' /> style name='TTipFont' type='font' isHTML='1' color='FFFFFF' bgColor='330033' size='11' /> style name='HTMLFont' type='font' color='333333' borderColor='CCCCCC' bgColor='FF0000' /> style name='myShadow' type='Shadow' distance='1'/> /definition> application> apply toObject="PLOT" styles="animX,animY"/> apply toObject='MARKERLABELS' styles='HTMLFont,myShadow' /> apply toObject='TOOLTIP' styles='TTipFont' /> /application> /styles> Thanks in advance for your help Keith Morse The Denver Post
  10. Pallav, That is odd that you're getting a 404. I tried it from the link in the forum post and got the same thing, but when I simply enter the url in my browser, it comes right up. At any rate, I just remembered how to generate the xml file through the GUI. It has been 8 months since I did one of these. My mind was a little foggy. If I have any more questions, I will post them. Thanks for your help. Keith Morse www.denverpost.com
  11. I previously have built an updatable Fusion Map using a United States map. You can see it at this link: http://www.denverpostplus.com/FusionMaps/LiveExamples/pw3.html I would like to apply the same concept using a map of Colorado, which I would update with new election results during the election night, and also change the color depending on which candidate is leading in each county. I also would like to make this a drill-down map that would allow the user to click on a county and go to another page with more detailed information. I have found in the documentation how to make a link in a drilldown, but what I cannot find is the proper xml for the counties in Colorado. I have found xml for cities in Colorado, but not counties. I set up an html file and an xml file. The html file references the map "Maps/FCMap_Colorado.swf" as it should. I also made an xml file (which I would like to update throughout election night). I started out using the ColoradoMap.as file from the MapsSource/com/fusionmaps/maps folder but it is not the right one. At this link, you can see what I have so far: http://www.denverpostplus.com/FusionMaps/LiveExamples/colo2008.html I am looking for a Colorado file that would give me the entity ID of each county which I could then add by way of a script other text and formatting information. For example, on my USA map, each line in the xml data file looked something like this: Is there such a file for each state or am I taking the wrong approach? Thanks in advance for your help. Keith Morse
  12. Sudipto, I will try this xml code insert. Thank you. Keith Morse Denver Pos t
  13. I was trying to put tabular matter inside a tooltip, but have had little success. If I use the Just as an experiment, I set up my tabular matter inside a conventional HTML page, then pasted it into my tooltip (after making the proper entity translations) and I got no line break from the Here is the HTML I am trying to replicate inside the tooltip: b>Democrats table>table width="100%"> tr> td align="left">Candidate /td> td align="right">Votes/td> td align="right">% /td> td align="right">Delegates /td> /tr> tr> td align="left">Clinton /td> td align="right">100 /td> td align="right">50.0 /td> td align="right">10 /td> /tr> /table> I think my HTML is valid. Am I missing something something in the Fusion Maps process here? Thanks in advance, Keith Morse
  14. Thanks. I'll take a different approach.
  15. Thank you for the direction. I now have markers in two colors. Here is what I did to define the type and color of the marker itself shapes> shape id='s1' type='arc' fillColor='0000FF'/> shape id='s2' type='circle' fillColor='FF0000'/> /shapes> application> marker id='CO-Dem' shapeId='s1' toolText=' ..... (html and text goes here) marker id='CO-GOP' shapeId='s2' toolText=' ..... (html and text goes here) /application> /markers> Now I would like to accomplish the same with the background color of the tool tip. I know that it must be a similar approach but I could not discern from your directions how to apply that to the tool tip background. In my xml file, the styles definition is just below the code I've included above. It looks like this: styles> definition> style type='animation' name='animX' param='_xscale' start='0' duration='1' /> style type='animation' name='animY' param='_yscale' start='0' duration='1' /> style name='TTipFont' type='font' isHTML='1' color='FFFFFF' bgColor='0000FF' size='11'/> style name='HTMLFont' type='font' color='333333' borderColor='CCCCCC' bgColor='FF0000'/> style name='myShadow' type='Shadow' distance='1'/> /definition> application> apply toObject="PLOT" styles="animX,animY"/> apply toObject='MARKERLABELS' styles='HTMLFont,myShadow' /> apply toObject='TOOLTIP' styles='TTipFont' /> /application> /styles> /map> Thank you in advance for your help. Keith Morse Denver Post