+1

PDF wont load...

Lcdrgreg 12 jaar geleden bijgewerkt door icahill (Administrator) 12 jaar geleden 13
I have a wire called android, dont know if you can see it, but I am creating an app for middle schoolers on quantrills raid. Making progress but now a pdf wont load, called the quantrillsraidmap... Do I have to put it on a panel?
You will have to invite me to the portfolio if you want me to have access. You can invite me as a collaborator to your project. My email is icahill@rarewire.com
I figured it out a different way by creating a panel with the image on it. Another thing I want to be able to do is to have actions like pulling up information when a pin is clicked. Is there a way to show more than just the title? I was playing with some of the features on but could not get them to work... I am also getting an error when I load the app, but doesnt affect its operation...

Thanks, love rarewire, see you friday night?
Assuming you are talking about Maps here. There is an attribute called onselect within the annotation tag that can trigger an action based on the touch of a pin on the map.

Also if you want more than just title, you can add accessoryview="right" and populate the accessory view with other objects. The max height is 100 px though.

I will be at the party, of course!
yes, talking about maps... On the accessoryview="right", could you show me a little sample wire, tried it and dont know how to populate it...
Also, tried replacing the pin with an image, also did not work, must be writing the wire incorrectly... Thanks for your help...
Try this example. To change the pin image, make sure you are pathing to an image that exists on your project.



<wire>
<classes>
<class name="annotations">
<annotation name="office" image="NAMEOFIMAGE.png" location="[param:location]" title="[param:title]" subtitle="[param:sub]" animatedrop="yes" accessoryview="left" accessoryviewwidth="100" accessoryviewheight="100" >
<panel name="accessory" width="25" height="25" background="ff0000">
<text name="test" width="100%" height="100%" color="#ffffff" font="arial" size="12" alignment="center" text="[param:text]"></text>
</panel>
</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" sub="address" text="PIC" target="MAP"/>
<create class="annotations" location="38.965096 -95.235983" title="Pyramid Pizza" sub="address" text="PIC" target="MAP"/>
</action>
</actions>
</wire>
I figured that out, thanks.

Is there a way to change each pin to a different image or to add text, like a number?

Also, I have a description of each place on the map and I am creating .png files for them. I want them to display on select and disappear when map clicked again like the pin tags. Would load work? and how would I write the wire?

Trying not to be a bother to you, know you are busy. I am starting to figure it out and having a great time.
Yeah in that case load would work great. you would need to set up variables to set when a certain pin is touched so you know which image to load.

If you wanted pins to be different images, you would need to create additional annotation classes.
Tried this 20 different ways, is this what the wire should look like?

The picture shows up on the tag once I select the pin, but I cant get the panel to load on click...
I had copied the wire in here, but its not showing, it is in my "android" app.
use a code block to show wire

<code></code>
Here it is... thanks again


<class name="annotations">
<annotation name="office" location="[param:location]" title="[param:title]" subtitle="[param:sub]" animatedrop="yes"
accessoryview="left" accessoryviewwidth="100" accessoryviewheight="100" onselect="miller">
<panel name="accessory" width="25" height="25" background="ff0000">
<image name="quantrill" source="quantrill.png" alignment="center" valign="center" contain="yes" ></image>
</panel>
</annotation>
</class>

<action name="miller">
<alpha value="0" time="0" target="UP"/>
<load panel="MILLER" /></action>
Try adding an alert tag to the action to see if it is firing or not.

You do have your action set to alpha UP to zero, which would make it invisible. If you want to see it, you should set the value to 1.