Search Results

Search found 6 results on 1 pages for 'bloudermilk'.

Page 1/1 | 1 

  • How to follow user location with MapKit

    - by Bloudermilk
    I'm using MapKit to display the user's location relative to pins around them. I'd like to be able to mimic the functionality that Maps provides via the crosshair button in the lower left-hand corner of the screen. I'm already aware that MapKit provides a CLLocation object with the user's location via MKUserLocation, I just wanted to seek advice on how I should keep focus on that location. My initial inclination was to use an NSTimer to center the map on that coordinate every 500ms or so. Is there a better way to do this? Is there something built in to MapKit that I'm missing that will accomplish this? Thanks so much, Brendan

    Read the article

  • jQuery parent of a parent

    - by Bloudermilk
    Hello, I am currently trying to find the parent of a parent of an element. I have a link being clicked that is in a <td>, and I'd like to get the <tr> object. Why wont "$(this).parent().parent()" work? What will? Thanks, Brendan Edit: It appears an error in my syntax was throwing the whole thing off. "$(this).parent().parent()" does in fact work, but I wound up going with $(this).closest('tr')" because it seems like the most efficient solution.

    Read the article

  • Trouble getting height of OverlayItem Drawable

    - by Bloudermilk
    Hey- I'm having some trouble getting a hold of the drawable a certain OverlayItem is using so I can calculate the height of it and properly offset the note that shows onTap. Here is my code to try to get that drawable: Drawable marker = item.getMarker(android.R.attr.state_focused); if (marker != null) int markerHeight = marker.getIntrinsicHeight(); marker ends up null. I'm using a drawable XML file with a selector for the different states of the OverlayItem's drawable. In it I'm specifying a drawable for the null state, state_focused, and state_pressed. Thanks for any help! -Nick

    Read the article

  • Ultra-grand super acts_as_tree rails query

    - by Bloudermilk
    Right now I'm dealing with an issue regarding an intense acts_as_tree MySQL query via rails. The model I am querying is Foo. A Foo can belong to any one City, State or Country. My goal is to query Foos based on their location. My locations table is set up like so: I have a table in my database called locations I use a combination of acts_as_tree and polymorphic associations to store each individual location as either a City, State or Country. (This means that my table consists of the rows id, name, parent_id, type) Let's say for instance, I want to query Foos in the state "California". Beside Foos that directly belong to "California", I should get all Foos that belong every City in "California" like Foos in "Los Angeles" and "San Francisco". Not only that, but I should get any Foos that belong to the Country that "California" is in, "United States". I've tried a few things with associations to no avail. I feel like I'm missing some super-helpful Rails-fu here. Any advice?

    Read the article

  • Attempting to calculate width of Map Overlays on the fly

    - by Bloudermilk
    Hey all- I am working on an Android app that utilizes the Google Maps API MapView, MapController, MapActivity, and ItemizedOverlay. I am basically trying to recreate certain functionalities of the Maps app (damn Google for not providing speech bubbles—for lack of a better name—for items!), particularly those speech bubbles. I have an invisible XML structure for the speech bubble in the XML layout file containing my MapView. The first time I show a speech bubble I grab that XML and remove it from it's current parent, applying some ItemizedOverlay.LayoutParams to it, and add it to the MapView as an Overlay. I position it above the item that was selected, fill it with the proper text, then set it to visible. This all works great. The goal here, though, is to also automatically animate the map to reveal any parts of a speech bubble that may be off-screen when it opens. So I'm trying popup.getWidth() (popup is the instance of my LinearLayout that is the speech bubble) after I do all the manipulation to the bubble, even after I display it to the user. Problem is, popup.getWidth() is returning me the width of the previously displayed popup, not the currently displayed one. I can't figure out why this would be happening if I'm fetching the width after I set it to visible with its new dimensions (which, by the way, are relative when I'm setting them with LayoutParams: fill_content for both width and height).. I have even tried forcing both the MapView and the "popup" to invalidate() before trying to fetch the width. Any ideas why this may be happening? How can I force the View to settle into its new dimensions before trying to fetch them? Thanks! Nick

    Read the article

1