Re: [android-developers] Re: google map marker
Android cannot give you an error of lines not supported. Did you try modifying the code to work with your project or did you just blindly copy paste? Did you change the variables and the XML files to the ones you have in your project? There are thousands of tutorials for this on the Internet. Google it. Thanks On Thu, Jul 28, 2011 at 10:35 AM, arun kumar hariarun2...@gmail.com wrote: abhishek can you send source code with xml file and android manifest file like project. because i try your coding its shows error.like some lines are not supported. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Appaholics -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: google map marker
Hello Raghav, you cannot understand my words. first analyze other words what they are saying and their situation right? then you tell your own suggestion. otherwise dont tell this kind of blindly copy paste words. On 7/28/11, Raghav Sood raghavs...@gmail.com wrote: Android cannot give you an error of lines not supported. Did you try modifying the code to work with your project or did you just blindly copy paste? Did you change the variables and the XML files to the ones you have in your project? There are thousands of tutorials for this on the Internet. Google it. Thanks On Thu, Jul 28, 2011 at 10:35 AM, arun kumar hariarun2...@gmail.com wrote: abhishek can you send source code with xml file and android manifest file like project. because i try your coding its shows error.like some lines are not supported. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Appaholics -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: google map marker
I am not telling you to blindly copy paste. On the contrary I am telling you not to copy paste anything blindly. If you had bothered to read my mail properly you would have noticed that I asked you if you had changed the code given by Abhishek to be usable with your project. That is changed the variable names, changed the R.class references to what you are using. I also pointed out that if you Google this problem you will get many tutorials that clearly explain what you are trying to achieve. Thanks On Thu, Jul 28, 2011 at 3:17 PM, arun kumar hariarun2...@gmail.com wrote: Hello Raghav, you cannot understand my words. first analyze other words what they are saying and their situation right? then you tell your own suggestion. otherwise dont tell this kind of blindly copy paste words. On 7/28/11, Raghav Sood raghavs...@gmail.com wrote: Android cannot give you an error of lines not supported. Did you try modifying the code to work with your project or did you just blindly copy paste? Did you change the variables and the XML files to the ones you have in your project? There are thousands of tutorials for this on the Internet. Google it. Thanks On Thu, Jul 28, 2011 at 10:35 AM, arun kumar hariarun2...@gmail.com wrote: abhishek can you send source code with xml file and android manifest file like project. because i try your coding its shows error.like some lines are not supported. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Appaholics -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Appaholics -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: google map marker
ya i change his code for my purpose. but got some error. i tried another code and i got multiple markers in google map. Thanks for your suggestion RAGAV. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: google map marker
abhishek can you send source code with xml file and android manifest file like project. because i try your coding its shows error.like some lines are not supported. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: google map marker
Hi Arun I am giving you two code snippets from my application in which i used three different colored markers. One is myOverlay Class Which will be the inner class of your Map Screen Activity and another code is a function in your activity which creates itemized overlay objects according to need of different colored markers and adds that overlay to map... Hope this will help you... :-) MyOverlay Class -- class MyOverlay extends ItemizedOverlayOverlayItem { private ArrayListOverlayItem mOverlays = new ArrayListOverlayItem(); private MapScreenActivity currentContext = null; private GeoPoint clickedOverlayGeoPoint; private Point point = null; private GeoPoint geoPoint = null; private Point pointTap = null; private Point pointScreenOverlay = null; private Point mapCenterPoint = null; private Drawable marker = null; private Projection projection = null; View view = null; private LayoutInflater inflater; private TextView txtAddress; private ImageView imgBlueArrow; public MyOverlay(Drawable defaultMarker) { super(boundCenter(defaultMarker)); marker = defaultMarker; populate(); } public MyOverlay(Drawable defaultMarker, Context context) { super(boundCenter(defaultMarker)); inflater = LayoutInflater.from(context); view = inflater.inflate(R.layout.popup ,null); txtAddress = (TextView) view.findViewById(R.id.txtAddress); imgBlueArrow = (ImageView) view.findViewById(R.id.imgBlueArrow); marker = defaultMarker; imgBlueArrow.setOnClickListener(new OnClickListener() { public void onClick(View v) { drawPath(new GeoPoint((int)(ConstantData.latitude*100), (int)(ConstantData.longitude*100)), clickedOverlayGeoPoint, Color.RED, mapView); mapView.invalidate(); } }); } @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { super.draw(canvas, mapView, false); //drawing numbers for overlapped dots for(int i=0;iarrayList.size();i++){ // get projection to convert geopoint to screen point geoPoint = new GeoPoint((int)(arrayList.get(i).getLatitude()*100), (int)(arrayList.get(i).getLongitude()*100)); projection = mapView.getProjection(); Point point = new Point(); projection.toPixels(geoPoint, point); } } public void addOverlay(MapScreenActivity currentContext, Record record) { this.currentContext = currentContext; geoPoint = new GeoPoint((int) (record.getLatitude() * 1E6), (int) (record.getLongitude() * 1E6)); OverlayItem overlay = new OverlayItem(geoPoint, Marker, Marker Text); overlay.setMarker(marker); mOverlays.add(overlay); populate(); } @Override protected OverlayItem createItem(int i) { // TODO Auto-generated method stub return mOverlays.get(i); } @Override public int size() { // TODO Auto-generated method stub return mOverlays.size(); } @Override public boolean onTap(GeoPoint p, MapView mapView) { try { pointTap = mapView.getProjection().toPixels(p, null); if (popup != null popup.isShowing()) { popup.dismiss(); putRecordOverlays(); putUserOverlay(); } } catch (Exception e) { Log.e(-, e.toString()); } return super.onTap(p, mapView); } @Override protected boolean onTap(int index) { geoPoint = mOverlays.get(index).getPoint(); pointScreenOverlay = mapView.getProjection().toPixels( geoPoint, null); Rect overlayRect = new Rect(); overlayRect.top = (pointScreenOverlay.y - marker.getIntrinsicHeight() / 2) - 10; overlayRect.left = (pointScreenOverlay.x - marker.getIntrinsicWidth() / 2) - 10; overlayRect.right = (pointScreenOverlay.x + marker.getIntrinsicWidth() / 2) + 10; overlayRect.bottom = (pointScreenOverlay.y + marker.getIntrinsicHeight() / 2) + 10; if (overlayRect.contains(pointTap.x, pointTap.y)) { try { OverlayItem item =