android - Is it possible to tap on a marker (thumbnail) in google Maps api v2 and enlarge "zoom in" -


i have marker in essence thumbnail. know is possible tap on thumbnail , display larger thumbnail, sort of blowing or zooming thumbnail? sorry short question. don't have code @ moment, if can i'll post code go along.

camera intent:

intent getcameraimage = new intent(mediastore.action_image_capture);          getapplicationcontext().getdir(                  getresources().getstring(r.string.app_name), mode_private);           fileuri = uri.fromfile(new file((environment.getexternalstoragedirectory() +                  "/" +getresources().getstring(r.string.app_name)),new date().gettime() + ".jpg"));              getcameraimage.putextra(mediastore.extra_output, fileuri);           startactivityforresult(getcameraimage, take_picture);          }     

onactivityresult

try {                   getimagethumbnail getimagethumbnail = new getimagethumbnail();                   bitmap = getimagethumbnail.getthumbnail(fileuri, this);               } catch (filenotfoundexception e1) {                   e1.printstacktrace();               } catch (ioexception e1) {                   e1.printstacktrace();               }               {                 markeroptions markeroptions = new markeroptions()              .position(thelastplacethattheuserlongclicked)              .icon(bitmapdescriptorfactory              .frombitmap(bitmap));              googlemap.addmarker(markeroptions);             }         }  } 

showfullimage

public void showfullimage(view view) { string path = (string) view.gettag();  if (path != null) {      intent intent = new intent();     intent.setaction(intent.action_view);     uri imguri = uri.parse("file://" + path);     intent.setdataandtype(imguri, "image/*");     startactivity(intent);    }  } } 

so how can implement showfullimage onmarkerclick

onmarkerclick

 @override         public boolean onmarkerclick(final marker marker) {      return false;  } 

what can is

mymarker= map             .addmarker(new markeroptions()                     .position(pos)                     .title(getresources().getstring(r.string.reachus))                     .snippet("we here")                     .icon(bitmapdescriptorfactory                             .fromresource(r.drawable.logo_small))); 

call setinfowindowadapter() method on google map object , set larger image smae marker removing first

map.setinfowindowadapter(new infowindowadapter() {          // use default infowindow frame         @override         public view getinfowindow(marker arg0) {             return null;         }          // defines contents of infowindow         @override         public view getinfocontents(marker arg0) {          mymarker.remove();         mymarker= map             .addmarker(new markeroptions()                     .position(pos)                     .title(getresources().getstring(r.string.reachus))                     .snippet("we here")                     .icon(bitmapdescriptorfactory                             .fromresource(r.drawable.logo_large)));              return v;          }     }); 

also if want make smaller again use toggle or flag set small image again.

just use remove() on marker , work


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -