Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Learning consumer portal and its SDK

Hi all, 

 

I am experimenting consumer portal and its SDK and try to see if we can bring some of our custom functions from Geospatial Portal to it, so please correct if I am wrong. It looks to me that map loading and drawing is done by leaflet. They wrap around it and create a subset of geospatial portal SDK functions, but leaflet API can't be touched directly. I wonder if we can take advantage of some awesome leaflet features and plugins.   

 

I appreciate if someone can give me some insights on how it works.

 

Kind regards, 

 

Technical Evangelist
Posts: 132
Registered: ‎08-05-2015

Re: Learning consumer portal and its SDK

Hi Bob,

 

although direct manipulation on Leaflet object is not part of the public API (as the customer portal aims to be independent from the specific map control implementation), it is possible to get a handle to it and extend it,

 

Please take a look at this example:

http://community.hexagongeospatial.com/t5/Shared-Samples/Examples-Viewfinder-Consumer-Portal/ta-p/36...

 

If you cannot access the source code, you can try on the old SDK wiki:

https://sdk.hexagongeospatial.com/index.php?title=Examples%3AViewfinder_Consumer_Portal

 

Best regards

Super Contributor
Posts: 301
Registered: ‎02-09-2016

Re: Learning consumer portal and its SDK

Hi Piotr, 

 

Thank you for your information, I did try all examples of the consumer portal in the community, they are very useful and help me to understand more the consumer portal. We attempt to bring some of our custom functions from Geospatial Portal to consumer such as Google Street View, but it still lacks of drawing capility (so we can't draw and update the direction)  and pin function is not up to the task (if we call clear pins, it will clear all, we cann't specific the pin layer that we want to clear). Therefore, I thought about accessing Leaftlet in order to take avantage of some of its useful functions such as marker or drawing plugin.

 

Kind regards 

Technical Evangelist
Posts: 132
Registered: ‎08-05-2015

Re: Learning consumer portal and its SDK

Hi Bob,

 

then accessing the leaflet handle as shown in the example above should be just fine!

 

Best regards

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