Hexagon Geospatial
MENU

M.App Enterprise

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 77
Registered: ‎01-20-2016
Accepted Solution

Feature Analyzer - add image to tooltip from db - mimetype

Hi all,

 

images can be added to tooltips via url

What about mimetype imagery in db, can they be linked to feature analyzer tooltips?

 

Any help appreciated

Ruth

Staff
Posts: 951
Registered: ‎10-19-2015

Re: Feature Analyzer - add image to tooltip from db - mimetype

hi Ruth,

 

can you please elaborate more on this? Do you want to place the imagery within the tooltip? You may use a functional attribute to build the WMS getMap or getLegendGraphic calls.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 77
Registered: ‎01-20-2016

Re: Feature Analyzer - add image to tooltip from db - mimetype

Hi Stefano,

 

to be more precise: I am collecting fotos via Mobile App and save them in mimetype format in the db.

I would like to show those fotos in my tooltips.

 

Thank you,

Ruth

Contributor
Posts: 77
Registered: ‎01-20-2016

Re: Feature Analyzer - add image to tooltip from db - mimetype

OK, mimetype was the wrong direction.The image is saved in a column "image" and a column "thumbnail" of type bytea as binary data. I think, those should be addressed, but how?

 

 

 

Staff
Posts: 501
Registered: ‎11-12-2015

Re: Feature Analyzer - add image to tooltip from db - mimetype

Hi Ruth,

 

There is a great post on adding multimedia to Analyzer View tooltips found here

 

Additionally, there are script examples provided within the Analyzer View > Functional Attributes tab to help accomplish this.

They are complete with comments to aid in personalizing the script.

tooltip.PNG

 

HTH

Contributor
Posts: 77
Registered: ‎01-20-2016

Re: Feature Analyzer - add image to tooltip from db - mimetype

Hi Stephen,

 

yes, I know those possibilities. As far as I understand, a url to the image is needed which I do not have collecting photos via Mobile App. If there is a way to access those images I could create a functional attribute which serves as a url....

 

Thanks

Staff
Posts: 501
Registered: ‎11-12-2015

Re: Feature Analyzer - add image to tooltip from db - mimetype

That's correct. The URL to the image is needed in these cases. 

Technical Evangelist
Posts: 1,016
Registered: ‎09-11-2015

Re: Feature Analyzer - add image to tooltip from db - mimetype

[ Edited ]

How about encoding the image into base64, which could be done automatically in the database using trigger or such, and then reference this column value like e.g.:

Capture.PNG

 

EDIT: See this link for details

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Technical Evangelist
Posts: 1,016
Registered: ‎09-11-2015

Re: Feature Analyzer - add image to tooltip from db - mimetype

I've just sucessfully tested this workflow - it expects to have base64 encoded image in the DB:

  1. Have a column with Image data-type stored in MSSQL, e.g. [image]
  2. Generate Base64 format and store it in another column, e.g. [IMAGE_BASE64]:
    select 'data:image/png;base64,'+(select [image] as '*' for xml path(''))
  3. Create functional attribute with HTML code referencing the [IMAGE_BASE64] column:
    3.png
  4. Create a tooltip
    4.PNG
  5. Resulting tooltip:
    5.PNG

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 77
Registered: ‎01-20-2016

Re: Feature Analyzer - add image to tooltip from db - mimetype

Hi Jan,

 

yes, indeed it's working well.

The only thing I am still struggling with is the option with showImageViewer. The base64 url is not accepted.

 

Anyhow, the tooltips look great now!!!

Thanks,

Ruth

Polls
Please register to vote
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.