+1

MAP usage

Lcdrgreg hace 12 años actualizado por icahill (Administrator) hace 12 años 2
At CAPS we are creating an interactive app for a high school field trip. How can I make a GPS enabled map and use it? I have played with the map tutorial and cant get it to do what I want. IS there some sample wire to show how to for example annotate a map of Lawrence KS?
Greg,

The annotation functionality was recently overhauled and the documentation got a little out of sync. Please take a look at this example and let me know if that is what you had in mind.


<wire>
<classes>
<class name="annotations">
<annotation name="office" location="[param:location]" title="[param:title]" animatedrop="yes"></annotation>
</class>
</classes>
<main>
<panel name="test" width="100%" height="100%" >
<map name="map" alias="MAP" width="100%" height="100%" type="map" currentlocation="yes"></map>
</panel>
</main>
<actions>
<action name="pin" oninit="yes">
<assign property="object:MAP.region" value="38.989983 -95.292835 38.926858 -95.202026"/>
<create class="annotations" location="38.9581 -95.2478" title="University of Kansas" target="MAP"/>
<create class="annotations" location="38.965096 -95.235983" title="Pyramid Pizza" target="MAP"/>
</action>
</actions>
</wire>
I have also updated the documentation for this. Hope that helps!