05-25-2016 03:28 PM
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.
05-31-2016 01:25 AM
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:
If you cannot access the source code, you can try on the old SDK wiki:
06-01-2016 04:28 PM
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.