tiles

How to show different menu according to rule of user using Tile3

五迷三道 提交于 2019-12-05 05:48:23
问题 I am using tile3, spring security and struts2. I have different number of users, each with specific role, and each role should has access to a specific menu, I have the follwoing tile.xml file but I am not sure how to change it in a way to solve the issue. Please let me know if you need me to provide any other part of my code. <tiles-definitions> <definition name="baseLayout" template="/baseLayout.jsp"> <put-attribute name="title" value=""/> <put-attribute name="header" value="/header.jsp"/>

How to build a Tiled map in Java for a 2D game?

一曲冷凌霜 提交于 2019-12-05 02:16:47
问题 Not sure how to approach this problem. Basically, I want a Pixel -> Tile representation of a 400x400 window. Each coordinate on the screen, e.g 120x300 should be part of a tile. My smallest sprite is 4 pixels, so we can say that 1 tile = 4 pixels. The player and enemy sprites are all 20 x 20, so each player/bad guy will occupy 5 tiles. Then I want to use this Map class to: Retrieve the x/y coordinates of a player/monster sprite by suppling the index/id of the tile. Knowing where the

Isometric Screen to Map

强颜欢笑 提交于 2019-12-05 01:35:25
问题 I'm trying to figure out how I can get the correct "active" tile under the mouse when I have "ramp" and +1 height tiles (see picture below). When my world is flat, everything works no problem. Once I add a tile with a height of say +1, along with a ramp going back to +0, my screen -> map routine is still looking as if everything is "flat". In the picture above, the green "ramp" is the real tile I want to render and calculate mouse -> map, however the blue tile you see "below" it is the area

AS3 tile map rendering (with 1000's of tiles)

…衆ロ難τιáo~ 提交于 2019-12-04 22:16:46
问题 Just first off I'll say that the context here is Actionscript 3.0 (IDE: Flashbuilder) along with the Starling Framework. So, I want to create a Tile Map that could be used for a platformer or something similar. I want to use 8x8 pixel tiles on an 800x600 pixel stage, and the problem I am having is that I don't know how to add these 7500+ tile objects to the stage without dramatically reducing the framerate. I've found that the drop in performance comes from adding each tile to the stage, not

Struts OR Tiles OR ???… JSP template solution

时光怂恿深爱的人放手 提交于 2019-12-04 20:12:27
currently I'm using a JSP templating system which uses this example's lib ("/WEB-INF/tlds/template.tld"). I'm not even sure how it's called. Anyway it seems like it's not too developed, it makes problems with form POST method, I have no idea who made it (just found it) and I've heard about Apache's Struts & Tiles. I'm not even sure that Struts does what I'm talking about. Down to business: A page in my site has this JSP content, that utilizes the template: <%@ taglib uri="/WEB-INF/tlds/template.tld" prefix="template"%> <template:insert template="/WEB-INF/main_template_page/template.jsp">

Show tile layer at very high zoom

自作多情 提交于 2019-12-04 18:32:51
I am trying to display the daily MODIS satellite images from the GIBS image server http://wiki.earthdata.nasa.gov/display/GIBS/Map+Library+Usage . The tiles are provided in the WMTS protocol. Here is an example of my code using Google maps API: var getTileUrl = function(tile, zoom) { return "http://map1.vis.earthdata.nasa.gov/wmts-webmerc/" + "MODIS_Terra_CorrectedReflectance_TrueColor/default/" + get_date() + "/" + "GoogleMapsCompatible_Level9/" + zoom + "/" + tile.y + "/" + tile.x + ".jpeg"; }; var layerOptions = { alt: "MODIS_Terra_TrueColor", getTileUrl: getTileUrl, maxZoom: 9, minZoom: 1,

Struts2 tiles org.apache.tiles.extras.complete.CompleteAutoloadTilesListener integration error

天大地大妈咪最大 提交于 2019-12-04 16:38:46
I am following answer posted here. OGNL and wildcards working in tiles definitions with struts2-tiles-plugin? If you know the answer, would apprecite if you tell me how to use freemarker with it. If don't even than I accept the answer if you solve my problem to make the code work. Everything is same but Struts2 & Tiles plugin - 2.3.4.1 pom.xml 1.6 UTF-8 3.1.2.RELEASE 2.3.4.1 1.6.6 2.2.2 <!-- Start Extras --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId>

Android Google Maps api v2 stops loading tiles

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 16:02:18
Upon loading the fragment it loads initial tiles. After that, it stops loading more detailed tiles automatically as the map moves according to GPS position. If I swipe the map it'll load all additional tiles. At some point I'll get past the point where it had loaded tiles and I'll have to swipe the screen to download more detailed tiles. I've added android:heapLarge="true" to the manifest, but that doesn't solve the issue. http://i60.tinypic.com/rr8sd1.png Edit: I've figured out why this was happening. I had set the animation time to 1 second to smooth it out. This doesn't allow the map to

Shiro doesn't redirect to unauthorizedUrl w/invalid login - Shiro with Spring and Tiles

百般思念 提交于 2019-12-04 15:13:18
I'm using Spring MVC, Tiles and Shiro. This is how my unauthorizedUrl property is configured: <property name="unauthorizedUrl" value="/unauthorized"/> My expectation is that when MyAuthorizingRealm finds invalid credentials, that Shiro will redirect to /unauthorized . But, that doesn't happen for me on form submission. I have a login @Controller that is mapped to handle GET and POST actions for /login . For accesses to the url /lists the login form is displayed. So it seems to work in one case but not the other. @Controller @RequestMapping(value = "/login") public class LoginController {

How to scroll and zoom in/out large images on iPhone?

ぃ、小莉子 提交于 2019-12-04 14:13:50
I have a large image, size around 30000 (w) x 6000 (h) pixels. You may consider it's like a big map. I assume I need to crop it up into smaller tiles. Questions: what are the right ViewControllers to use? ( link ) what is the tile strategy? (I put this in another question, as it's not iPhone specific) Requirements: whole image (though cropped) can be scrolled up/down/left/right by swipes zoom in (up to pixel-to-pixel) out (down to screen-fit-by-height) by the 2-finger operation memory efficiency by lazy loading tiles Bonus requirements: automatic scroll, say from left to right slowly and