Search Results

Search found 1427 results on 58 pages for 'zoom pat'.

Page 12/58 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Isometric Camera trouble - can't rotate or move correctly

    - by Deukalion
    I'm trying to create a 3D editor, but I've been having some trouble with the Camera and understanding each component. I've created 2 camera that works OK, but now I'm trying to implement an Isometric Camera in XNA without success on the rotation and movement of the camera. All I get working is Zoom. (Cube with x=3f, y=3f, z=1f in center) And this is the constructor for my IsometricCamera (inherits from ICamera, with methods for Rotation, Movement and Zoom, and Properties for World/View/Projection matrices) public IsometricCamera3D(GraphicsDevice device, float startClip = -1000f, float endClip = 1000f) { matrix_projection = Matrix.CreateOrthographic(device.Viewport.Width, device.Viewport.Height, startClip, endClip); rotation = Vector3.Zero; matrix_view = Matrix.CreateScale(zoom) * Matrix.CreateRotationY(MathHelper.ToRadians(45 + 180)) * Matrix.CreateRotationX(MathHelper.ToRadians(30)) * Matrix.CreateRotationZ(MathHelper.ToRadians(120)) * Matrix.CreateTranslation(rotation.X, rotation.Y, rotation.Z); } Problem is when I rotate it, all that happens is that the Cube gets more or less shiny and nothing happens. What is wrong and how should I create my View matrix to move it / rotate it correctly? Rotate, Move and Zoom looks like: MethodName(Vector3 rotation/movement), Zoom(float value); and just increases the value, then calls an update to recreate the View Matrix according to the code in the constructor. Currently, in my editor I use MiddleButton + Mouse Movement to rotate the camera, but it's not working as the other camera. But in my default camera I use World Matrix to move, but I guess that's not the best way to go which is why I'm trying this.

    Read the article

  • Zooming to point of interest

    - by user1010005
    I have the following variables: Point of interest which is the position(x,y) in pixels of the place to focus. Screen width,height which are the dimensions of the window. Zoom level which sets the zoom level of the camera. And this is the code I have so far. void Zoom(int pointOfInterestX,int pointOfInterstY,int screenWidth, int screenHeight,int zoomLevel) { glTranslatef( (pointOfInterestX/2 - screenWidth/2), (pointOfInterestY/2 - screenHeight/2),0); glScalef(zoomLevel,zoomLevel,zoomLevel); } And I want to do zoom in/out but keep the point of interest in the middle of the screen. but so far all of my attempts have failed and I would like to ask for some help.

    Read the article

  • Touch Event Not Work With PinchZoom

    - by Siddharth
    I was implemented pinch zoom functionality for my tower of defense game. I manage different entity to display all the towers. From that entity game player select the tower and drag to the actual position where he want to plot the tower. I set the entity in HUD also, so user scroll and zoom the region, the tower become visible all the time. Basically I have created the different entity to show and hide towers only so I can manage it easily. My problem is when I have not perform the scroll and zoom the tower touch and the dragging easily done but when I zoom and scroll the scene at that time the tower touch event does not call so the player can not able to drag and drop it to actual position. So anybody please help me to come out of it.

    Read the article

  • OpenGL ES - how to keep some object at a fixed size?

    - by OMH
    I'm working on a little game in OpenGL ES. In the background, there is a world/map. The map is just a large texture. Zoom/pinch/pan is used to move around. And I'm using glOrthof (left, right, bottom, top, zNear, zFar) to implement the zoom/pinch. When I zoom in, the sprites on top of the map is also zoomed in. But I would like to have some sprites stay at a fixed size. I could probably calculate a scale factor, depending on the parameters to glOrthof, but there must be a more natural and straightforward way of doing that, instead of scaling the sprites down when I zoom in. If I add some text or some GUI elements on top of the map, they should definately have a fixed size. Is there a solution to do this, or do I have to leave fixed values in glOrthof and implement zoom/pinch in another way? EDIT: To be more clear: I want sprites that zoom in/out along with the map, but stay at the same size. I have some elements that are like the pins on the iPhone's map application. When you zoom, the pins stay the same size, but move around on the screen to stay on the same spot on the map. That is mainly what I want a solution for. Solutions for this already came below, thanks!

    Read the article

  • Ubuntu 12.04 Install - Black Screen - No Grub - Have run Boot Repair Disk

    - by Pat
    Day 4 of my purgatory. History: Had problems with live CD at first, had to set the "nomodeset" option ... and then it worked fine. Installed Ubuntu "Alongside" Windows XP from live CD (NOT wubi) Upon reboot after installation, I get the BIOS ... and then a black screen. If I hit shift after the BIOS screen I get text that says "loading GRUB ..", but then no GRUB ... just a black screen. What I have tried to do: Total re-installation ... 3 times now. Also tried with wubi, same black screen. Have gone back to the normal (non-wubi) install. After installation, I tried re-booting the live cd ... and trying to change GRUB file using: sudo gedit /etc/default/grub ... to "nomodeset" and "timeout=10" ... but won't let me save my changes because I'm using the live cd "in memory" system and don't have permissions to the disks (I think). I tried logging in ... but it won't let me. I then read many posts on this site. I'm stuck. This morning, I ran the "boot repair disk". Results here: http://paste.ubuntu.com/1132333/ What I think is wrong: Since I can get the live CD to run (perfectly) with the "nomodeset" option, I think all I need to do is get to GRUB to change that ... but I can't get to GRUB. Appreciate any advice. Pat Day 5 ... I downloaded "Super Grub 2 Disk" from: http://www.supergrubdisk.org/super-grub2-disk/ This looks promising. I can boot the disk and it brings me to a GRUB program that allows me to: 1) Boot to Windows ... which works 2) Boot to Ubuntu ... which does NOT work When I choose boot to Ubuntu, I get lines across the screen which is an obvious video card problem. Likely because I need to set the "nomodeset" option. So, I attempted to use super grub2 to edit the grub file ... but it is TOTALLY different than the Ubuntu grub file ... and I don't know where to put the "nomodeset" option. Still stuck ... The bottom line is that: 1) I need to edit /etc/default/grub on sda(1) ... which is my boot drive ... to add the "nomodeset" option 2) To do that I need to get into grub ... but, I can't. Holding down shift just echo's "loading grub .." and then takes me to a black screen 3) I can boot to the live CD by setting nomodeset .... but I cannot access the hard disk as root ... I can't save my changes! Can anyone tell me how to login as root for the filesystem from the live CD ... so I can edit the grub file on the HARD DISK ... and then run update-grub??

    Read the article

  • MouseWheel: Scrolling vs. Zooming

    - by beaudetious
    I've got a Silverlight 4 custom control that basically is several Canvas elements wrapped inside a ScrollViewer. The user can set a property to determine whether to scroll or zoom when using their mouses wheel. In the custom control's MouseWheel event, I check to see if they want to scroll or zoom. If zooming, I determine the delta and modify the custom control's zoom level (which then handles the zooming code for me). The problem is that zooming won't start until the ScrollViewer's current position of the vertical scrollbar is at the top or bottom of the scrollbar. Once their, then the zooming works perfectly. Does anyone have any suggestions on how I can prevent scrolling completely so that I only zoom (when the user wants to zoom, that is)? Thanks!

    Read the article

  • What is the best way to implement this composite GetHashCode()

    - by Frank Krueger
    I have a simple class: public class TileName { int Zoom, X, Y; public override bool Equals (object obj) { var o = obj as TileName; return (o != null) && (o.Zoom == Zoom) && (o.X == X) && (o.Y == Y); } public override int GetHashCode () { return (Zoom + X + Y).GetHashCode(); } } I was curious if I would get a better distribution of hash codes if I instead did something like: public override int GetHashCode () { return Zoom.GetHashCode() + X.GetHashCode() + Y.GetHashCode(); } This class is going to be used as a Dictionary key, so I do want to make sure there is a decent distribution.

    Read the article

  • UIScrollView. Any thoughts on implementing "infinite" scroll/zoom?

    - by dugla
    So, UITableView supports essentially "infinite" scrolling. There' may be a limit but that sucker can scroll for a looonnnggg time. I would like to mimic this behavior with a UIScrollView but there are two fundamental impediments: 1) scrollView.contentSize is fixed at creation time. 2) zooming can blow any lazy-loading scheme all to hell since it can cause infinte data explosion. Have others out there pondered this idea? Yah, I know, we are essentially talking about re-creating Google Maps here. Any insights would be much appreciated. Cheers, Doug

    Read the article

  • java.util.regex.Pattern matching the beginning of a String

    - by Pierre
    Hi all, Is it possible to know if a stream/string contains an input that could match a regular expression. For example String input="AA"; Pattern pat=Pattern.compile("AAAAAB"); Matcher matcher=pat.matcher(input); //<-- something here returning true ? or String input="BB"; Pattern pat=Pattern.compile("AAAAAB"); Matcher matcher=pat.matcher(input); //<-- something here returning false ? Thanks

    Read the article

  • Semantic Fish-eye zoom on table cells in UIKit?

    - by niblha
    How would I go about implementing a table view that looks and works something as illustrated in the link below, with UIKit for the iPhone? http://img442.imageshack.us/img442/4177/uifisheyeview.png I was thinking of using UITableView, and was looking a bit at the UITableViewDelegate methods tableView:willDisplayCell:forRowAtIndexPath: tableView:heightForRowAtIndexPath: But it seems as the UITableView will modify the cell frames after these methods are called and just before the cells are drawn? Maybe skipping the UITableView and go straight for some subclassing of a UIScrollView would be a better approach? So my question is basically that I would just like some overall thought in what might be the best ways to use existing UIKit components to implement this type of table view.

    Read the article

  • Silverlight 4 desktop application sometimes zooms when touching it... and cannot zoom out

    - by TimothyP
    Hi, I have a Silverlight 4 desktop application which I control using a touchscreen (on an HP Touchsmart). Most of the time it works fine but sometimes when clicking something everything just zooms in and every time it happens things get bigger and bigger. The only way to get the normal size again is by restarting the application. Has anybody got any idea what might be causing it ? Does not seem to happen in browser mode. Is there a way to prevent zooming? Thnx

    Read the article

  • How to zoom image on mouseover at some XY coordinate in JSF?

    - by Paul
    This is the code I use to display images. <t:dataList var="item" value="#{occasionBean.messageInfo}" layout="simple"> <h:commandLink action="#{occasionBean.selectedImage}" > <h:graphicImage styleClass="thumbnail" width="100" height="100" url="#{item.imageSnapUrl}" onclick="return setMsgId(this.id,#{item.img_id},'#{item.imageUrl}');" id="test" onmouseover="" onmouseout=""> </h:graphicImage> </h:commandLink> </t:dataList> Please give some solution.

    Read the article

  • how do you load a file into a content provider to use the zoom functions???

    - by user357032
    I used the tutorial on this website but i dont really understand how to get the file that i wont to be loaded into it. Does anyone know what i have to do to get a file in my res folder to show up in the webview through the content provider or even another way to do it? http://www.techjini.com/blog/2009/01/10/android-tip-1-contentprovider-accessing-local-file-system-from-webview-showing-image-in-webview-using-content/

    Read the article

  • Creating a thematic map

    - by jsharma
    This post describes how to create a simple thematic map, just a state population layer, with no underlying map tile layer. The map shows states color-coded by total population. The map is interactive with info-windows and can be panned and zoomed. The sample code demonstrates the following: Displaying an interactive vector layer with no background map tile layer (i.e. purpose and use of the Universe object) Using a dynamic (i.e. defined via the javascript client API) color bucket style Dynamically changing a layer's rendering style Specifying which attribute value to use in determining the bucket, and hence style, for a feature (FoI) The result is shown in the screenshot below. The states layer was defined, and stored in the user_sdo_themes view of the mvdemo schema, using MapBuilder. The underlying table is defined as SQL> desc states_32775  Name                                      Null?    Type ----------------------------------------- -------- ----------------------------  STATE                                              VARCHAR2(26)  STATE_ABRV                                         VARCHAR2(2) FIPSST                                             VARCHAR2(2) TOTPOP                                             NUMBER PCTSMPLD                                           NUMBER LANDSQMI                                           NUMBER POPPSQMI                                           NUMBER ... MEDHHINC NUMBER AVGHHINC NUMBER GEOM32775 MDSYS.SDO_GEOMETRY We'll use the TOTPOP column value in the advanced (color bucket) style for rendering the states layers. The predefined theme (US_STATES_BI) is defined as follows. SQL> select styling_rules from user_sdo_themes where name='US_STATES_BI'; STYLING_RULES -------------------------------------------------------------------------------- <?xml version="1.0" standalone="yes"?> <styling_rules highlight_style="C.CB_QUAL_8_CLASS_DARK2_1"> <hidden_info> <field column="STATE" name="Name"/> <field column="POPPSQMI" name="POPPSQMI"/> <field column="TOTPOP" name="TOTPOP"/> </hidden_info> <rule column="TOTPOP"> <features style="states_totpop"> </features> <label column="STATE_ABRV" style="T.BLUE_SERIF_10"> 1 </label> </rule> </styling_rules> SQL> The theme definition specifies that the state, poppsqmi, totpop, state_abrv, and geom columns will be queried from the states_32775 table. The state_abrv value will be used to label the state while the totpop value will be used to determine the color-fill from those defined in the states_totpop advanced style. The states_totpop style, which we will not use in our demo, is defined as shown below. SQL> select definition from user_sdo_styles where name='STATES_TOTPOP'; DEFINITION -------------------------------------------------------------------------------- <?xml version="1.0" ?> <AdvancedStyle> <BucketStyle> <Buckets default_style="C.S02_COUNTRY_AREA"> <RangedBucket seq="0" label="10K - 5M" low="10000" high="5000000" style="C.SEQ6_01" /> <RangedBucket seq="1" label="5M - 12M" low="5000001" high="1.2E7" style="C.SEQ6_02" /> <RangedBucket seq="2" label="12M - 20M" low="1.2000001E7" high="2.0E7" style="C.SEQ6_04" /> <RangedBucket seq="3" label="&gt; 20M" low="2.0000001E7" high="5.0E7" style="C.SEQ6_05" /> </Buckets> </BucketStyle> </AdvancedStyle> SQL> The demo defines additional advanced styles via the OM.style object and methods and uses those instead when rendering the states layer.   Now let's look at relevant snippets of code that defines the map extent and zoom levels (i.e. the OM.universe),  loads the states predefined vector layer (OM.layer), and sets up the advanced (color bucket) style. Defining the map extent and zoom levels. function initMap() {   //alert("Initialize map view");     // define the map extent and number of zoom levels.   // The Universe object is similar to the map tile layer configuration   // It defines the map extent, number of zoom levels, and spatial reference system   // well-known ones (like web mercator/google/bing or maps.oracle/elocation are predefined   // The Universe must be defined when there is no underlying map tile layer.   // When there is a map tile layer then that defines the map extent, srid, and zoom levels.      var uni= new OM.universe.Universe(     {         srid : 32775,         bounds : new OM.geometry.Rectangle(                         -3280000, 170000, 2300000, 3200000, 32775),         numberOfZoomLevels: 8     }); The srid specifies the spatial reference system which is Equal-Area Projection (United States). SQL> select cs_name from cs_srs where srid=32775 ; CS_NAME --------------------------------------------------- Equal-Area Projection (United States) The bounds defines the map extent. It is a Rectangle defined using the lower-left and upper-right coordinates and srid. Loading and displaying the states layer This is done in the states() function. The full code is at the end of this post, however here's the snippet which defines the states VectorLayer.     // States is a predefined layer in user_sdo_themes     var  layer2 = new OM.layer.VectorLayer("vLayer2",     {         def:         {             type:OM.layer.VectorLayer.TYPE_PREDEFINED,             dataSource:"mvdemo",             theme:"us_states_bi",             url: baseURL,             loadOnDemand: false         },         boundingTheme:true      }); The first parameter is a layer name, the second is an object literal for a layer config. The config object has two attributes: the first is the layer definition, the second specifies whether the layer is a bounding one (i.e. used to determine the current map zoom and center such that the whole layer is displayed within the map window) or not. The layer config has the following attributes: type - specifies whether is a predefined one, a defined via a SQL query (JDBC), or in a json-format file (DATAPACK) theme - is the predefined theme's name url - is the location of the mapviewer server loadOnDemand - specifies whether to load all the features or just those that lie within the current map window and load additional ones as needed on a pan or zoom The code snippet below dynamically defines an advanced style and then uses it, instead of the 'states_totpop' style, when rendering the states layer. // override predefined rendering style with programmatic one    var theRenderingStyle =      createBucketColorStyle('YlBr5', colorSeries, 'States5', true);   // specify which attribute is used in determining the bucket (i.e. color) to use for the state   // It can be an array because the style could be a chart type (pie/bar)   // which requires multiple attribute columns     // Use the STATE.TOTPOP column (aka attribute) value here    layer2.setRenderingStyle(theRenderingStyle, ["TOTPOP"]); The style itself is defined in the createBucketColorStyle() function. Dynamically defining an advanced style The advanced style used here is a bucket color style, i.e. a color style is associated with each bucket. So first we define the colors and then the buckets.     numClasses = colorSeries[colorName].classes;    // create Color Styles    for (var i=0; i < numClasses; i++)    {         theStyles[i] = new OM.style.Color(                      {fill: colorSeries[colorName].fill[i],                        stroke:colorSeries[colorName].stroke[i],                       strokeOpacity: useGradient? 0.25 : 1                      });    }; numClasses is the number of buckets. The colorSeries array contains the color fill and stroke definitions and is: var colorSeries = { //multi-hue color scheme #10 YlBl. "YlBl3": {   classes:3,                  fill: [0xEDF8B1, 0x7FCDBB, 0x2C7FB8],                  stroke:[0xB5DF9F, 0x72B8A8, 0x2872A6]   }, "YlBl5": {   classes:5,                  fill:[0xFFFFCC, 0xA1DAB4, 0x41B6C4, 0x2C7FB8, 0x253494],                  stroke:[0xE6E6B8, 0x91BCA2, 0x3AA4B0, 0x2872A6, 0x212F85]   }, //multi-hue color scheme #11 YlBr.  "YlBr3": {classes:3,                  fill:[0xFFF7BC, 0xFEC44F, 0xD95F0E],                  stroke:[0xE6DEA9, 0xE5B047, 0xC5360D]   }, "YlBr5": {classes:5,                  fill:[0xFFFFD4, 0xFED98E, 0xFE9929, 0xD95F0E, 0x993404],                  stroke:[0xE6E6BF, 0xE5C380, 0xE58A25, 0xC35663, 0x8A2F04]     }, etc. Next we create the bucket style.    bucketStyleDef = {       numClasses : colorSeries[colorName].classes, //      classification: 'custom',  //since we are supplying all the buckets //      buckets: theBuckets,       classification: 'logarithmic',  // use a logarithmic scale       styles: theStyles,       gradient:  useGradient? 'linear' : 'off' //      gradient:  useGradient? 'radial' : 'off'     };    theBucketStyle = new OM.style.BucketStyle(bucketStyleDef);    return theBucketStyle; A BucketStyle constructor takes a style definition as input. The style definition specifies the number of buckets (numClasses), a classification scheme (which can be equal-ranged, logarithmic scale, or custom), the styles for each bucket, whether to use a gradient effect, and optionally the buckets (required when using a custom classification scheme). The full source for the demo <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Oracle Maps V2 Thematic Map Demo</title> <script src="http://localhost:8080/mapviewer/jslib/v2/oraclemapsv2.js" type="text/javascript"> </script> <script type="text/javascript"> //var $j = jQuery.noConflict(); var baseURL="http://localhost:8080/mapviewer"; // location of mapviewer OM.gv.proxyEnabled =false; // no mvproxy needed OM.gv.setResourcePath(baseURL+"/jslib/v2/images/"); // location of resources for UI elements like nav panel buttons var map = null; // the client mapviewer object var statesLayer = null, stateCountyLayer = null; // The vector layers for states and counties in a state var layerName="States"; // initial map center and zoom var mapCenterLon = -20000; var mapCenterLat = 1750000; var mapZoom = 2; var mpoint = new OM.geometry.Point(mapCenterLon,mapCenterLat,32775); var currentPalette = null, currentStyle=null; // set an onchange listener for the color palette select list // initialize the map // load and display the states layer $(document).ready( function() { $("#demo-htmlselect").change(function() { var theColorScheme = $(this).val(); useSelectedColorScheme(theColorScheme); }); initMap(); states(); } ); /** * color series from ColorBrewer site (http://colorbrewer2.org/). */ var colorSeries = { //multi-hue color scheme #10 YlBl. "YlBl3": { classes:3, fill: [0xEDF8B1, 0x7FCDBB, 0x2C7FB8], stroke:[0xB5DF9F, 0x72B8A8, 0x2872A6] }, "YlBl5": { classes:5, fill:[0xFFFFCC, 0xA1DAB4, 0x41B6C4, 0x2C7FB8, 0x253494], stroke:[0xE6E6B8, 0x91BCA2, 0x3AA4B0, 0x2872A6, 0x212F85] }, //multi-hue color scheme #11 YlBr. "YlBr3": {classes:3, fill:[0xFFF7BC, 0xFEC44F, 0xD95F0E], stroke:[0xE6DEA9, 0xE5B047, 0xC5360D] }, "YlBr5": {classes:5, fill:[0xFFFFD4, 0xFED98E, 0xFE9929, 0xD95F0E, 0x993404], stroke:[0xE6E6BF, 0xE5C380, 0xE58A25, 0xC35663, 0x8A2F04] }, // single-hue color schemes (blues, greens, greys, oranges, reds, purples) "Purples5": {classes:5, fill:[0xf2f0f7, 0xcbc9e2, 0x9e9ac8, 0x756bb1, 0x54278f], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] }, "Blues5": {classes:5, fill:[0xEFF3FF, 0xbdd7e7, 0x68aed6, 0x3182bd, 0x18519C], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] }, "Greens5": {classes:5, fill:[0xedf8e9, 0xbae4b3, 0x74c476, 0x31a354, 0x116d2c], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] }, "Greys5": {classes:5, fill:[0xf7f7f7, 0xcccccc, 0x969696, 0x636363, 0x454545], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] }, "Oranges5": {classes:5, fill:[0xfeedde, 0xfdb385, 0xfd8d3c, 0xe6550d, 0xa63603], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] }, "Reds5": {classes:5, fill:[0xfee5d9, 0xfcae91, 0xfb6a4a, 0xde2d26, 0xa50f15], stroke:[0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3, 0xd3d3d3] } }; function createBucketColorStyle( colorName, colorSeries, rangeName, useGradient) { var theBucketStyle; var bucketStyleDef; var theStyles = []; var theColors = []; var aBucket, aStyle, aColor, aRange; var numClasses ; numClasses = colorSeries[colorName].classes; // create Color Styles for (var i=0; i < numClasses; i++) { theStyles[i] = new OM.style.Color( {fill: colorSeries[colorName].fill[i], stroke:colorSeries[colorName].stroke[i], strokeOpacity: useGradient? 0.25 : 1 }); }; bucketStyleDef = { numClasses : colorSeries[colorName].classes, // classification: 'custom', //since we are supplying all the buckets // buckets: theBuckets, classification: 'logarithmic', // use a logarithmic scale styles: theStyles, gradient: useGradient? 'linear' : 'off' // gradient: useGradient? 'radial' : 'off' }; theBucketStyle = new OM.style.BucketStyle(bucketStyleDef); return theBucketStyle; } function initMap() { //alert("Initialize map view"); // define the map extent and number of zoom levels. // The Universe object is similar to the map tile layer configuration // It defines the map extent, number of zoom levels, and spatial reference system // well-known ones (like web mercator/google/bing or maps.oracle/elocation are predefined // The Universe must be defined when there is no underlying map tile layer. // When there is a map tile layer then that defines the map extent, srid, and zoom levels. var uni= new OM.universe.Universe( { srid : 32775, bounds : new OM.geometry.Rectangle( -3280000, 170000, 2300000, 3200000, 32775), numberOfZoomLevels: 8 }); map = new OM.Map( document.getElementById('map'), { mapviewerURL: baseURL, universe:uni }) ; var navigationPanelBar = new OM.control.NavigationPanelBar(); map.addMapDecoration(navigationPanelBar); } // end initMap function states() { //alert("Load and display states"); layerName = "States"; if(statesLayer) { // states were already visible but the style may have changed // so set the style to the currently selected one var theData = $('#demo-htmlselect').val(); setStyle(theData); } else { // States is a predefined layer in user_sdo_themes var layer2 = new OM.layer.VectorLayer("vLayer2", { def: { type:OM.layer.VectorLayer.TYPE_PREDEFINED, dataSource:"mvdemo", theme:"us_states_bi", url: baseURL, loadOnDemand: false }, boundingTheme:true }); // add drop shadow effect and hover style var shadowFilter = new OM.visualfilter.DropShadow({opacity:0.5, color:"#000000", offset:6, radius:10}); var hoverStyle = new OM.style.Color( {stroke:"#838383", strokeThickness:2}); layer2.setHoverStyle(hoverStyle); layer2.setHoverVisualFilter(shadowFilter); layer2.enableFeatureHover(true); layer2.enableFeatureSelection(false); layer2.setLabelsVisible(true); // override predefined rendering style with programmatic one var theRenderingStyle = createBucketColorStyle('YlBr5', colorSeries, 'States5', true); // specify which attribute is used in determining the bucket (i.e. color) to use for the state // It can be an array because the style could be a chart type (pie/bar) // which requires multiple attribute columns // Use the STATE.TOTPOP column (aka attribute) value here layer2.setRenderingStyle(theRenderingStyle, ["TOTPOP"]); currentPalette = "YlBr5"; var stLayerIdx = map.addLayer(layer2); //alert('State Layer Idx = ' + stLayerIdx); map.setMapCenter(mpoint); map.setMapZoomLevel(mapZoom) ; // display the map map.init() ; statesLayer=layer2; // add rt-click event listener to show counties for the state layer2.addListener(OM.event.MouseEvent.MOUSE_RIGHT_CLICK,stateRtClick); } // end if } // end states function setStyle(styleName) { // alert("Selected Style = " + styleName); // there may be a counties layer also displayed. // that wll have different bucket ranges so create // one style for states and one for counties var newRenderingStyle = null; if (layerName === "States") { if(/3/.test(styleName)) { newRenderingStyle = createBucketColorStyle(styleName, colorSeries, 'States3', false); currentStyle = createBucketColorStyle(styleName, colorSeries, 'Counties3', false); } else { newRenderingStyle = createBucketColorStyle(styleName, colorSeries, 'States5', false); currentStyle = createBucketColorStyle(styleName, colorSeries, 'Counties5', false); } statesLayer.setRenderingStyle(newRenderingStyle, ["TOTPOP"]); if (stateCountyLayer) stateCountyLayer.setRenderingStyle(currentStyle, ["TOTPOP"]); } } // end setStyle function stateRtClick(evt){ var foi = evt.feature; //alert('Rt-Click on State: ' + foi.attributes['_label_'] + // ' with pop ' + foi.attributes['TOTPOP']); // display another layer with counties info // layer may change on each rt-click so create and add each time. var countyByState = null ; // the _label_ attribute of a feature in this case is the state abbreviation // we will use that to query and get the counties for a state var sqlText = "select totpop,geom32775 from counties_32775_moved where state_abrv="+ "'"+foi.getAttributeValue('_label_')+"'"; // alert(sqlText); if (currentStyle === null) currentStyle = createBucketColorStyle('YlBr5', colorSeries, 'Counties5', false); /* try a simple style instead new OM.style.ColorStyle( { stroke: "#B8F4FF", fill: "#18E5F4", fillOpacity:0 } ); */ // remove existing layer if any if(stateCountyLayer) map.removeLayer(stateCountyLayer); countyByState = new OM.layer.VectorLayer("stCountyLayer", {def:{type:OM.layer.VectorLayer.TYPE_JDBC, dataSource:"mvdemo", sql:sqlText, url:baseURL}}); // url:baseURL}, // renderingStyle:currentStyle}); countyByState.setVisible(true); // specify which attribute is used in determining the bucket (i.e. color) to use for the state countyByState.setRenderingStyle(currentStyle, ["TOTPOP"]); var ctLayerIdx = map.addLayer(countyByState); // alert('County Layer Idx = ' + ctLayerIdx); //map.addLayer(countyByState); stateCountyLayer = countyByState; } // end stateRtClick function useSelectedColorScheme(theColorScheme) { if(map) { // code to update renderStyle goes here //alert('will try to change render style'); setStyle(theColorScheme); } else { // do nothing } } </script> </head> <body bgcolor="#b4c5cc" style="height:100%;font-family:Arial,Helvetica,Verdana"> <h3 align="center">State population thematic map </h3> <div id="demo" style="position:absolute; left:68%; top:44px; width:28%; height:100%"> <HR/> <p/> Choose Color Scheme: <select id="demo-htmlselect"> <option value="YlBl3"> YellowBlue3</option> <option value="YlBr3"> YellowBrown3</option> <option value="YlBl5"> YellowBlue5</option> <option value="YlBr5" selected="selected"> YellowBrown5</option> <option value="Blues5"> Blues</option> <option value="Greens5"> Greens</option> <option value="Greys5"> Greys</option> <option value="Oranges5"> Oranges</option> <option value="Purples5"> Purples</option> <option value="Reds5"> Reds</option> </select> <p/> </div> <div id="map" style="position:absolute; left:10px; top:50px; width:65%; height:75%; background-color:#778f99"></div> <div style="position:absolute;top:85%; left:10px;width:98%" class="noprint"> <HR/> <p> Note: This demo uses HTML5 Canvas and requires IE9+, Firefox 10+, or Chrome. No map will show up in IE8 or earlier. </p> </div> </body> </html>

    Read the article

  • Website does not automatically fit to iphone screen

    - by Ploetzeneder
    Hello, The following code does not fit onto the iphone screen; how do I have to define the viewport? <html> <body> <center> <div id="karteu" style="background: url('../customer/Karten/karte1.jpg') no-repeat left center;width:714px;height:540px;" > </div> </body> </html> Normally the site should be zoomed, so i first should see the website in small, and then be able to zoom that i see it in the original size, but in my case it does not, when i call the site, the zoom is, that the image has this original size already, and that i have to scroll, but i dont want to scroll,...i want to use the normal safari mobile zoom and then scroll The solution at the bottom does not zoom anything. I want to see the overview of the image at the beginning. Then i want to be able to zoom with the normal safari zoom functions,..

    Read the article

  • Optimum no./size partitions for Windows 7

    - by Pat. Mitchell
    I plan to install a 500GB drive in my notebook (HP dv2613tu/1.5gHz/4MB RAM) and need advice about optimum size and number of partitions to create. Ideally looking for the following: OS (Windows 7 Ultimate) Swap file Applications Data ??? As a long time Mac user I'm not nearly as informed about Windows. I could leave everything as a single partition, but am seeking maximum performance and efficiency from my system (which won't be changing anytime soon). So, would separate partitions help with this aim? And given my usual habit of accumulating stuff, I want to reserve most space for Applications and Data. I've also set myself a project over the next couple of years of digitizing the whole of my 35 y.o. collection of slides and photographs from my travelling days. Thanks. Pat. Mitchell

    Read the article

  • Upgrade the Graphics Card for a Dell Dimension 3100

    - by Pat Foran
    Hi, I have a Dell Dimension 3100 Desktop with a 128MB Graphics Card Integrated into the Mother Board. I need to upgrade this 128MB to at least 256MB or 512MB if the system will support same. I am told by Dell that all I have is a PCIx1 slot and that they do not stock a Graphics Card for this. I was told to shop around at Amazon and ebay etc and I would find one there. I have shopped around for some time now and do not know exactly what I am looking for. There are several PCI Graphics Card out there but which one would be the correct one for a Dell Dimension 3100. Can you help me resolve this problem. If you know of a PCIx1 card that will sort out my problem you might please let me have all the details for to purchase it. Regards, Pat,

    Read the article

  • XNA - Mouse coordinates to word space transformation

    - by Gabriel Butcher
    I have a pretty annoying problem. I would like to create a drawing program, using winform + XNA combo. The most important part would be to transform the mouse position into the XNA drawn grid - I was able to make it for the translations, but it only work if I don't zoom in - when I do, the coordinates simply went horrible wrong. And I have no idea what I doing wrong. I tried to transform with scaling matrix, transform with inverse scaling matrix, multiplying with zoom, but none seems to work. In the beginning (with zoom value = 1) the grid starts from (0,0,0) going to (Width, Height, 0). I was able to get coordinates based on this grid as long as the zoom value didn't changed at all. I using a custom shader, with orthographic projection matrix, identity view matrix, and the transformed world matrix. Here is the two main method: internal void Update(RenderData data) { KeyboardState keyS = Keyboard.GetState(); MouseState mouS = Mouse.GetState(); if (ButtonState.Pressed == mouS.RightButton) { camTarget.X -= (float)(mouS.X - oldMstate.X) / 2; camTarget.Y += (float)(mouS.Y - oldMstate.Y) / 2; } if (ButtonState.Pressed == mouS.MiddleButton || keyS.IsKeyDown(Keys.Space)) { zVal += (float)(mouS.Y - oldMstate.Y) / 10; zoom = (float)Math.Pow(2, zVal); } oldKState = keyS; oldMstate = mouS; world = Matrix.CreateTranslation(new Vector3(-camTarget.X, -camTarget.Y, 0)) * Matrix.CreateScale(zoom / 2); } internal PointF MousePos { get { Vector2 mousePos = new Vector2(Mouse.GetState().X, Mouse.GetState().Y); Matrix trans = Matrix.CreateTranslation(new Vector3(camTarget.X - (Width / 2), -camTarget.Y + (Height / 2), 0)); mousePos = Vector2.Transform(mousePos, trans); return new PointF(mousePos.X, mousePos.Y); } } The second method should return the coordinates of the mouse cursor based on the grid (where the (0,0) point of the grid is the top-left corner.). But is just don't work. I deleted the zoom transformation from the matrix trans, as I didnt was able to get any useful result (most of the time, the coordinates was horrible wrong, mostly many thousand when the grid's size is 500x500). Any idea, or suggestion? I trying to solve this simple problem for two days now :\

    Read the article

  • links for 2010-03-25

    - by Bob Rhubart
    Andy Mulholland: Grasping the single point that is powering a lot of the change "What has changed, and is changing our environment is a reversal of the technology model from a focus on data and the ‘pushing’ of this structured data towards users, to a ‘pull’ model based on users’ abilities to find unstructured data using search." -- Andy Mulholland (tags: enterprisearchitecture cloud) Pat Shepherd: SOA Checklist Is SOA the answer for your particular problem? Pat Shepherd's checklist might help you make the right call. (tags: otn oracle enterprisearchitecture soa)

    Read the article

  • Slowdown upon router/modem setup change

    - by Ollie Saunders
    I’ve been using a Belkin FSD7632-4 modem router to connect to my TalkTalk provided ADSL internet connection for some time and been pretty happy with it. Recently, however, the connection has been failing and I decided to get a ASUS RT-N16 instead, which is also a much more capable router generally. The ASUS RT-N16 doesn’t come with a modem built-in so I purchased as Zoom modem as well. I’ve set them both up and am using them to post this message. But I’m a bit miffed to find that I get a significantly and consistently slower downstream rate from the new configuration than with the old Belkin. Belkin modem router: downstream: 3.45 mbps upstream: 0.73 mbps ASUS router + Zoom modem: downstream: 2.71 mbps upstream: 0.66 mbps Any ideas why this is? The really weird thing about this is that the Zoom supports ADSL2 and ADSL2+ but I don’t think the old Belkin does. At first I thought it might be due to the Zoom modem being limited to PPPoE instead of PPPoA, which my ISP supports, but then I tried using PPPoE with the Belkin and that still gave a high speed. I’m using VC-Mux encapsulation with both. VPI of 0 and VCI of 38. I pulled this data off the Zoom: Mode: ADSL2 Line Coding: Trellis On Status: No Defect Link Power State: L0 Downstream Upstream SNR Margin (dB): 12.3 11.8 Attenuation (dB): 43.0 24.9 Output Power (dBm): 12.9 0.0 Attainable Rate (Kbps): 3936 844 Rate (Kbps): 3194 840 MSGc (number of bytes in overhead channel message): 59 10 B (number of bytes in Mux Data Frame): 99 14 M (number of Mux Data Frames in FEC Data Frame): 2 16 T (Mux Data Frames over sync bytes): 1 8 R (number of check bytes in FEC Data Frame): 8 8 S (ratio of FEC over PMD Data Frame length): 1.9833 9.0594 L (number of bits in PMD Data Frame): 839 219 D (interleaver depth): 32 2 Delay (msec): 15 4 Super Frames: 15808 14078 Super Frame Errors: 0 4294967232 RS Words: 513778 111753 RS Correctable Errors: 126 4294967238 RS Uncorrectable Errors: 0 N/A HEC Errors: 0 4294967279 OCD Errors: 0 0 LCD Errors: 0 0 Total Cells: 1920175 237597 Data Cells: 205993 392 Bit Errors: 0 0 Total ES: 0 0 Total SES: 0 0 Total UAS: 34 0

    Read the article

  • Show floor-plans online like a map

    - by Quora Feans
    Given a floor-plan, which is too big for any screen, even if it is a 17" one, how can I show it online like a map? It would need further functionality that a browser alone does not have (just zoom in/out the entire image won't do the trick). The image will be breaked down into smaller jpgs, so the user will not have to download the whole floorplan at once.It will need some zoom in/zoom out button, and some way or bookmarking position (x,y). open-source solutions prefered.

    Read the article

  • How do I make an on-screen HUD in libgdx?

    - by Devin Carless
    I'm new to libgdx, and I am finding I am getting stumped by the simplest of things. It seems to want me to do things a specific way, but the documentation won't tell me what that is. I want to make a very simple 2d game in which the player controls a spaceship. The mouse wheel will zoom in and out, and information and controls are displayed on the screen. But I can't seem to make the mouse wheel NOT zoom the UI. I've tried futzing with the projection matrices in between Here's my (current) code: public class PlayStage extends Stage { ... public void draw() { // tell the camera to update its matrices. camera.update(); // tell the SpriteBatch to render in the // coordinate system specified by the camera. spriteBatch.setProjectionMatrix(camera.combined); spriteBatch.begin(); aButton.draw(spriteBatch, 1F); playerShip.draw(spriteBatch, 1F); spriteBatch.end(); } } camera.zoom is set by scrolled(int amount). I've tried about a dozen variations on the theme of changing the camera's projection matrix after the button is drawn but before the ship is, but no matter what I do, the same things happen to both the button and the ship. So: What is the usual libgdx way of implementing an on-screen UI that isn't transformed by the camera's projection matrix/zoom?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >