+1

How do you place a custom pin on your current location?

JohnWeez 12 years ago updated by icahill (Administrator) 12 years ago 3
Trying to place a custom designed marker on a map onto the current location "blue dot." It'd be ideal if this happened after touching a button.
You can drop annotations at your current location by defining an attribute for location on your annotation.

If you want to replace the pin with an image, use an attribute of image="" and populate the value with an image stored in your App.


<class name="office">
<annotation name="office" location="39.093606 -94.583316" image="image.png" >
</annotation>
</class>
And if I just want to use current location what do I set "location=" as
Currently you can't change the showuser=yes (from map tag) native blue dot, but you can pull the current location through an object property and replace the value of the annotation with the variable you saved.

You would have to add currentlocation="yes" to your map tag to achieve this.

(assign property="var:currentloc" value="[object:MAP.location]"/)
(assign property="object:ANNOTATION.location" value="[var:currentloc]"/)