Search Results

Search found 2 results on 1 pages for 'karnage'.

Page 1/1 | 1 

  • Android: Map Overlay Labels

    - by karnage
    I am building a MapView and I want my custom overlay items to display the name of the location they are marking when the user taps them, like the Android Maps app. I setup the onTap listener and the floating TextView to hold the location name. I still need to set it up so that it redraws the label when the user moves the map, etc. Anyway, I am wondering if I am reinventing the wheel here. Is there a built-in method I am unaware of? I would think that most implementations of MapView have labels. For reference, my implementation so far: in map xml: <LinearLayout android:id="@+id/mapBubbleWrap" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true"> <TextView android:id="@+id/mapBubble" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" android:background="#ffffff" android:textColor="#ff0000"/> </LinearLayout> in my extended ItemizedOverlay: public boolean onTap(int index) { this.setFocus( mOverlays.get(index) ); return true; } in my Activity onFocus: public void onFocusChanged( ItemizedOverlay overlay, OverlayItem item ) { if( item != null) { mapBubble.setText(item.getTitle()); Point newPoint = mapView.getProjection().toPixels(item.getPoint(), null); mapBubbleWrap.setPadding(newPoint.x, newPoint.y-10, 0, 0); mapBubble.setVisibility(View.VISIBLE); } }

    Read the article

  • Magento: Rebuilding Flat Catalog Programmatically

    - by karnage
    I am using a cron to import inventory changes nightly. When I try to change a product's information (price, etc) I get the following error: Column not found: 1054 Unknown column 'e.display_price_group_0' in 'field list' I can fix this by clicking "Rebuild Flat Catalog Product" in the Cache Management panel. I setup a cron to do this programmatically using the following code: Mage :: getResourceModel( 'catalog/product_flat_indexer' ) -> rebuild(); I don't get any errors when I run the script, but the "Column not found" error persists. Does anyone know how I can rebuild the flat catalog other than through the admin interface?

    Read the article

1