Marker.imageasset

First, I wanted to thank SteveJG for getting me closer to solving a problem i'm having with dynamic marker.imageasset. Steve, you showed me a snippet of code that would allow a user to click on marker and have it load a new marker image. The image would appear for whatever time frame i set. I can get it to work if i include image url in marker title or description. I can then load new image upon longclick event by referencing the title or description property. The only problem is that the image url gets displayed in the infobox. I only want to show the user name, fish species, fish weight/length and date caught. Please advise.

Mark

With reference to this topic

Possibly because your code Blocks tell the app to display the url in the bubble. You did not share the code where you post the data so I can only guess Mark. Did you set Marker.Description or set Marker.Title to url somewhere in your code. Those Blocks post whatever information the developer wants to display when a Marker is clicked to the bubble.

There is another possibility based on your description. When the custom Image displays in the position of the Marker, the bubble is 'offset' ; the app thinks the image's upper left corner is the 'center' of the Marker.

Show a screen capture of what you see displayed. I may have a solution if that is the real problem. anchorforMarkerImage

Show a code example and a screen capture so we can see what might have gone wrong?

Attached is the code block for fishing app. In the current configuration the url is displayed in infobox. I don't want it in the box. Just Name, fish species, weight, length and date caught. I'm not sure how to reference the url without putting it in marker title or description. Please advise.

It appears the url is sourced in

in your csvData List as the 9th item.

To not post the url in the InfoBox you could

  • delete set Marker.Title Block or disable it.
  • Keep the Marker.Title Block but replace the url and have the to puzzle piece point to a Text block with the words 'FISH' or something.

You could reference the url by placing it in a Label positioned adjacent to your map or display it in the TitleBar perhaps. That will not provide a clickable link. Instead of placing the url that way, use a Button and a WebVIewer pointing to the url if you want a user to visit that link.

here is a screen shot of infobox after clicking on fish. as you can see it has image url in infobox screen. if you long click a picture of your fish is displayed. but the ony way I can reference image is by putting it in marker title or description. need another method. Little help!
Screenshot_20201124-164420|243x500

This shows the url is posting to the Marker.Title
Bubble

If you do not want it, delete Marker.Title as shown in post #4 AND

.

Do not post item #9, this is where your url is coming from.

Two suggestions were already provided Mark.

What have you tried? Did you delete (or disable) the Marker.Title Blocks as suggested? That will prevent showing the url in the InfoBox. Only you can decide where to display the url in your app.
If you need a clickable link, your only option is to use a WebViewer.

Steve, how do I know what map marker the user clicked? the data that is associated with the marker gets embedded in the marker title or description correct? along with lat/long. your method of making the infobox non visible and puttng the url in a image component or label would work fine, but thats not what I want to happen. I want the physical map marker to change from original map market (fish) to the photo of what the user posted. Does the marker have any other way of determining which marker is clicked? is there a index? The create marker block uses a number property. is there a way to capture that number? I can't seem to find a way to do so. Please advise.

thanks

You are asking lots of questions Mark. All the answers to your questions are described in* Marker , you only need to look and experiment.

You don't want to "making the infobox non visible and puttng the url in a image component or label would work fine". That is OK, then you need to figure out a different way to display user's images.

To change the 'physical map marker' (I assume you are using run time Markers? Do you know the difference between run time and design time Markers?) use the set Marker.ImageAsset Block.

You can possibly use these Any component Blocks to do what you want
MarkersRuntimeAnycomponent

There is no 'index' unless the developer creates one (a List of runtime Markers). Capture that index? The above commented Blocks should provide you with some ideas.

You are now creating a huge fishing can of worms. Start a new discussion please to ask how to do that. What you want is complicated and has huge issues ( your user's photo is going to be huge and you will try to fit the original image into the the Marker) and grab data from outside your app. You can use his/her photo; the users pride and joy photo will probably cover the entire map! :cry: What you do to show the user's image depends on where the user's photo comes from, whether you reduce that photo's dimensions and make a Thumbnail that will fit, etc. This is your app and you need to handle that.

Thanks for your input. I found another way to do what I want.