Hexagon Geospatial
MENU

Smart M.App

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 8
Registered: ‎04-01-2016

BI MAP with GeoJSON hangs on loading

Hello!

 

I'm trying to make a simple test app that consists of a BI MAP with three points specified in geojson

 

{"id":"2442","type":"FeatureCollection","properties":{"uid":"MOSCOWRIVER2-2015061810-N-01-01","shootingType":"water","batchType":"production","positioningStatus":"finished","stitchStatus":"finished"},"features":[{"id":"2478752","type":"Feature","geometry":{"type":"Point","coordinates":[37.6701883333,55.7016266667,123.22]},"properties":{"uid":"MOSCOWRIVER2-2015061810-N-01-01/0001","active":false,"course":0.0,"origCourse":334.22,"origCoordinates":[37.6701883333,55.7016266667],"originOffsetHorizontal":180.0}},{"id":"2478753","type":"Feature","geometry":{"type":"Point","coordinates":[37.6701883333,55.7016266667,123.23]},"properties":{"uid":"MOSCOWRIVER2-2015061810-N-01-01/0002","active":false,"course":0.0,"origCourse":334.22,"origCoordinates":[37.6701883333,55.7016266667],"originOffsetHorizontal":180.0}},{"id":"2478754","type":"Feature","geometry":{"type":"Point","coordinates":[37.6701883333,55.7016266667,123.23]},"properties":{"uid":"MOSCOWRIVER2-2015061810-N-01-01/0003","active":false,"course":0.0,"origCourse":334.22,"origCoordinates":[37.6701883333,55.7016266667],"originOffsetHorizontal":180.0}}]}

 

 But my app hangs on loading screen with errors in js console:

 

> Uncaught Error: Provided definition is not valid (undefined)     app.js:613

 

All settings are left default. What am I doing wrong?

Technical Evangelist
Posts: 495
Registered: ‎09-11-2015

Re: BI MAP with GeoJSON hangs on loading

The problem is becuase you most likely put the uid attribute as dimension and measure (get there by default). Uid is a string attribute, so the color cannot be assigned based on this attribute. If you set for example the course as dimension and measure, then the error goes away.

 

Pavel

Occasional Contributor
Posts: 8
Registered: ‎04-01-2016

Re: BI MAP with GeoJSON hangs on loading

Ok, I see, I had to coose some data to color that I really didn't want to measure. And even after that my points were transparent and only were appearing for a moment when I was hiding and showing them back. 

 

But how do I show only points without measurable information. When I don't add colors and measures, it hangs. But I only need dots. Of any non-transparent color.

Highlighted
Technical Evangelist
Posts: 495
Registered: ‎09-11-2015

Re: BI MAP with GeoJSON hangs on loading

I think dimension and measure should always be defined, but it does not harm anything. You can define for example custom attribute with constant value 1 and base both dimension and measure on this attribute. Then all the features will have the same color. You don't need to define any chart and so on. So this is IMHO not a problem.

 

Another problem is that I can see exactly what you observe - short flash of point and then nothing. There is something in the log saying "No style attachments available". I have no idea how to define a style for a point feature class. Hopefully someone else on this forum can shed a light on this issue.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.