Search Results

Search found 5 results on 1 pages for 'ferronrsmith'.

Page 1/1 | 1 

  • Google Maps Polygon - Not creating independent

    - by ferronrsmith
    I am basically populating a map with polygons, I am using the flex sdk. The problem I am having is that each time it adds a parish it keep adding to the previous polygons and treating it as one. HELP!! <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="ABQIAAAAGe0Fqwt-nY7G2oB81ZIicRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRcFmaI_t1gtsS5UN6mWQkH9kIw6Q"/> <mx:Script> <![CDATA[ import com.google.maps.Color; import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; import com.google.maps.controls.ZoomControl; import com.google.maps.overlays.Polygon; import com.google.maps.overlays.PolygonOptions; import com.google.maps.styles.FillStyle; import com.google.maps.styles.StrokeStyle; import mx.controls.Alert; import mx.utils.ColorUtil; import mx.utils.object_proxy; private var polys:Array = new Array(); private var labels:Array = new Array(); // private var pts:Array = new Array(); // private var poly:Polygon; // private var map:Map; private function onMapReady(event:Event):void { map.setCenter(new LatLng(18.070146,-77.225647), 9, MapType.NORMAL_MAP_TYPE); map.addControl(new ZoomControl()); map.enableScrollWheelZoom(); map.enableContinuousZoom(); getXml(); } public function getXml():void { var xmlString:URLRequest = new URLRequest("parish.xml"); var xmlLoader:URLLoader = new URLLoader(xmlString); xmlLoader.addEventListener("complete", readXml); } private function readXml(event:Event):void { var markersXML:XML = new XML(event.target.data); var markers:XMLList = markersXML..parish; //var markersCount:int = markers.length(); var i:Number; var t:Number; for(i=0; i < markers.length(); i++) { var marker:XML = markers[i]; var name:String = marker.@name; var colour:String = marker.@colour; // Alert.show(""); var the_p:XMLList = markers..point; var pts:Array = []; for(t=0; t < the_p.length(); t++) { var theparish:XML = the_p[t]; pts[t] = new LatLng(theparish.@lat,theparish.@lng); // Alert.show("working" + theparish.@lat); // var pts.push(new LatLng(theparish.@lat,theparish.@lng)); } var poly:Polygon = new Polygon(pts, new PolygonOptions({ strokyStyle: new StrokeStyle({ color: colour, thickness: 1, alpha: 0.2}), fillStyle: new FillStyle({ color: colour, alpha: 0.2}) })); //polys.push(poly); //labels.push(name); Alert.show("this"); pts = [] map.addOverlay(poly); } } /* public function createMarker(latlng:LatLng, name:String, address:String, type:String): Marker { var marker:Marker = new Marker(latlng, new MarkerOptions({icon: new customIcons[type], iconOffset: new Point(-16, -32)})); var html:String = "<b>" + name + "</b> <br/>" + address; marker.addEventListener(MapMouseEvent.CLICK, function(e:MapMouseEvent):void { marker.openInfoWindow(new InfoWindowOptions({contentHTML:html})); }); return marker; } */ ]]> </mx:Script> </mx:Application>

    Read the article

  • Rendering HTML in Java

    - by ferronrsmith
    I am trying to create a help panel for an application I am working on. The help file as already been created using html technology and I would like it to be rendered in a pane and shown. All the code I have seen shows how to render a site e.g. "http://google.com". I want to render a file from my pc e.g. "file://c:\tutorial.html" This is the code i have, but it doesn't seem to be working. import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; import java.awt.Color; import java.awt.Container; import java.io.IOException; import static java.lang.System.err; import static java.lang.System.out; final class TestHTMLRendering { // ------------------------------ CONSTANTS ------------------------------ /** * height of frame in pixels */ private static final int height = 1000; /** * width of frame in pixels */ private static final int width = 1000; private static final String RELEASE_DATE = "2007-10-04"; /** * title for frame */ private static final String TITLE_STRING = "HTML Rendering"; /** * URL of page we want to display */ private static final String URL = "file://C:\\print.html"; /** * program version */ private static final String VERSION_STRING = "1.0"; // --------------------------- main() method --------------------------- /** * Debugging harness for a JFrame * * @param args command line arguments are ignored. */ @SuppressWarnings( { "UnusedParameters" } ) public static void main( String args[] ) { // Invoke the run method on the Swing event dispatch thread // Sun now recommends you call ALL your GUI methods on the Swing // event thread, even the initial setup. // Could also use invokeAndWait and catch exceptions SwingUtilities.invokeLater( new Runnable() { /** * } fire up a JFrame on the Swing thread */ public void run() { out.println( "Starting" ); final JFrame jframe = new JFrame( TITLE_STRING + " " + VERSION_STRING ); Container contentPane = jframe.getContentPane(); jframe.setSize( width, height ); contentPane.setBackground( Color.YELLOW ); contentPane.setForeground( Color.BLUE ); jframe.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); try { out.println( "acquiring URL" ); JEditorPane jep = new JEditorPane( URL ); out.println( "URL acquired" ); JScrollPane jsp = new JScrollPane( jep, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED ); contentPane.add( jsp ); } catch ( IOException e ) { err.println( "can't find URL" ); contentPane.add( new JLabel( "can't find URL" ) ); } jframe.validate(); jframe.setVisible( true ); // Shows page, with HTML comments erroneously displayed. // The links are not clickable. } } ); }// end main }// end TestHTMLRendering

    Read the article

  • JQuery performance issue (Or just bad CODING!)

    - by ferronrsmith
    function getItemDialogContent(planItemType) { var oDialogContent = $('<div/>').append($('#cardDialogHelper').html()).addClass("card"); if (planItemType) { oDialogContent.find('#cardDialogHeader').addClass(planItemType).find('#dialogTitle').html(planItemType); oDialogContent.find('#cardDialogCustomFields').html($('#' + planItemType + 'DialogFields').html()); if (planItemType == 'announcement' || planItemType == 'question') { oDialogContent.find("#dialogPin").remove(); } } return oDialogContent; } I am doing some code cleanup for a web application I am working on. The above method lags in IE and most of our user base use IE. Can someone help me. I figure the find() method is very expensive because of the DOM traversal and I am thinking of optimizing. Any ideas anyone? Thanks in advance :D Been doing some profiling on the application and the following line seems to be causing alot of problems. help me please. is there any way I can optimize ? $('').append($('#cardDialogHelper').html()).addClass("card"); This is the ajax call that does the work. Is there a way to do some of this after the call. Please help me. (Added some functions I thought would be helpful in the diagnosis) GetAllPlansTemp = function() { $.getJSON("/SAMPLE/GetAllPlanItems",processData); } processData = function(data) { _throbber = showThrobber(); var sortedPlanItems = $(data.d).sort("Sequence", "asc"); // hideThrobber(_throbber); $(sortedPlanItems).each(createCardSkipTimelime); doCardStacks(); doTimelineFormat(); if (boolViewAblePlans == 'false') { $("p").show(); } hideThrobber(_throbber); } function createCardSkipTimelime() { boolViewAblePlans = 'false'; if (this.__Deleted == 'true' || IsPastPlanItem(this)) { return; } boolViewAblePlans = 'true'; fixer += "\n" + this.TempKey; // fixes what looks like a js threading issue. var value = CreatePlanCard2(this, GetPlanCardStackContainer(this.__type)); UpdatePlanCardNoTimeLine(value, this); } function CreatePlanCard2(carddata, sContainer) { var sCardclass = GetPlanCardClass(carddata.__type); var editdialog = getItemDialogContent(sCardclass); return $('<div/>').attr('id', carddata.TempKey).card({ 'container': $(sContainer), 'cardclass': sCardclass, 'editdialog': editdialog, 'readonly': GetCardMode(carddata) }); }

    Read the article

  • SkillsBank Module

    - by ferronrsmith
    I am working in Joomla trying to build a skillsbank. I am wondering if there exists any open-source module on the net that supports this operation. Can anyone help me please

    Read the article

1