android


Remove Marker Google Map api v2 - Android


I want to draw and remove Marker according to the previous conditions must be how
Example:
int a ;
if( a > 0 ) {
draw Marker
}
if(a == 0) {
remove Marker
}
You almost had it:
private Marker marker;
// ...
private void draw(int a) {
if (a == 0) {
if (marker != null) {
marker.remove();
marker = null;
}
} else if (a > 0) {
marker = mMap.addMarker(new MarkerOptions().position(new LatLng(40,-4)));
}
}

Related Links

OutOfMemory when decoding image from url
adding view with delay
simple TCP server-client using two Android emulators [closed]
Cache color hint to transparent doesn't remove fade effect
Android solving compatibility with SDK_INT hack; is this ok?
Slide Unlocker ImageView [duplicate]
URL with parameter in WebView not working in Android?
How to pause Video Player?
How to find LayoutParams of Android objects
how to avoide duplication of threads?
Import com.google.api.client.* cannot be resolved
stackoverflowerror when resume an activity at the second time
android : MalformedURLException: Protocol not found
Titanium Android: View not attached to window manager chrash
Imageloader only loading images in list after listitem has gone off screen
OutOfMemory with YUV->RGB C-Function

Categories

HOME
c99
ns-3
knitr
gradient
can
spring-data-mongodb
web-hosting
onclick
nuget-package
lanczos
google-chrome-app
java.util.logging
datastage
zerobrane
flatpak
do-while
gruntfile
template-engine
swagger-2.0
topology
cgbitmapcontext
inno-download-plugin
pchart
mongoid6
aggregation
tiki-wiki
google-cloud-print
beautifier
surveymonkey
winexe
sinch
bringtofront
iis-express
mql
constexpr
livelink
catch-unit-test
erb
card.io
android-gridview
android-maps-extensions
keras-layer
activexobject
installscript
indy10
modalviewcontroller
cd
urlsession
movilizer
print-css
placeholder
memory-mapping
flask-login
facebook-social-plugins
opennms
magento-2.0.7
geotiff
launchctl
bluez
backbone-collections
git-flow
er-diagram
seq
trigger.io
javafx-css
gets
custom-lists
pacemaker
segment-io
windows-azure-queues
kiosk
nupic
contentcontrol
spring-retry
opl
oracle-spatial
roadkill-wiki
toolkit
amiga
telepat
xmltype
java-security
gamekit
verold
malformedurlexception
modular
hidapi
flex++
merb
fb.ui
preload
boost-msm
pinch
procedures
workflow-services
multiplatform
massive
presentation-layer
ruby-1.8
contentpresenter

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App