Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix pushpin location on Droid

  • Loading branch information...
commit 60677626dfdd015298a71da84dc8609dadaf169a 1 parent c0a9020
Billy Charlton authored
View
54 .settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,56 @@
-#Sat Dec 05 16:25:15 PST 2009
+#Thu Dec 17 15:09:50 PST 2009
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=false
+cleanup.remove_unnecessary_nls_tags=false
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_CycleTracks
+cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
View
14 src/org/sfcta/cycletracks/ShowMap.java
@@ -66,7 +66,7 @@ public void onCreate(Bundle savedInstanceState) {
GeoPoint center = new GeoPoint(latcenter, lgtcenter);
MapController mc = mapView.getController();
mc.animateTo(center);
- mc.zoomToSpan(trip.lathigh - trip.latlow, trip.lgthigh - trip.lgtlow);
+ mc.zoomToSpan(10+trip.lathigh - trip.latlow, 10+trip.lgthigh - trip.lgtlow);
if (gpspoints == null) {
AddPointsToMapLayerTask maptask = new AddPointsToMapLayerTask();
@@ -146,13 +146,15 @@ public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) {
super.draw(canvas, mapView, shadow);
//---translate the GeoPoint to screen pixels---
- Point screenPts = new Point();
- mapView.getProjection().toPixels(p, screenPts);
+ Point screenPoint = new Point();
+ mapView.getProjection().toPixels(p, screenPoint);
//---add the marker---
- Bitmap bmp = BitmapFactory.decodeResource(
- getResources(), d);
- canvas.drawBitmap(bmp, screenPts.x-4, screenPts.y-46, null);
+ Bitmap bmp = BitmapFactory.decodeResource(getResources(), d);
+ int height = bmp.getScaledHeight(canvas);
+ int width = (int)(0.133333 * bmp.getScaledWidth(canvas)); // 4/30 pixels: how far right we want the pushpin
+
+ canvas.drawBitmap(bmp, screenPoint.x-width, screenPoint.y-height, null);
return true;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.