ThinkGeo.com    |     Documentation    |     Premium Support

Load data from an array and display popup

Good morning.

I’m attempting to write a function that loads a set of data and displays some feature details in a mouseover tooltip based on that data
For example, mousing over a certain US state, I want to display the number of books sold for that state.
Some states will have actual values, others not (can also be 0).

We have an object array that houses the data that also gets output to the client side for other functionality. i.e. [{state: ‘Texas’, value:‘200’},…]
The sample I’ve seen loads similar data from a shapefile. Is it possible to do from an object on the server side?

On the front end, so far I have managed to get the marker and pop up to follow the mouse and update the popup with the real time coordinates, but I’m at a loss as to how to pull any information about which feature I’m currently over.

also, is there a way to disable zooming/panning on the map?

Hi Maria,

We don’t know what’s library you are using, but for the sample library OpenLayers and Leaflet, they have API to disable zoom and pan.

For what’s the detail API and how to use them, I think you should want to view their mainpage and get more information from their documentation.

Wish that’s helpful.

Regards,

Don

Hello, any updates for the mouse over functionality? We need to at least figure out if this is feasible with the current version of mapsuite for webAPI.

We currently have a license for web version of the mapping software and are using version 9.
We have the functionality we need, but we are upgrading our application and will need to use the webAPI version going forward. We are determining if we will still have all the necessary functionality if we go with mapsuite webAPI or whether we will need to look for alternatives.

Please let me know as soon as possible, as we are nearing the decision point.

Hi Maria,

Just like we introduced in wiki, the WebAPI edition focus on build REST based web services to do the server side rendering, querying and geometric functions. Its mainly work is in server side, we include OpenLayers and Leaflet is just for a sample, you can also choose any client side library your project require.

So the function like mouse over should be supported by the client library you chosen.

WebAPI edition is not the same as webedition, in 10.0 we also have the webform edition, which is the original webedition. WebAPI get better flexibility, and suitable more scenarios, but you need get more time to implement client side by JavaScript or other script language, it only provide server side support by REST.

Wish that’s helpful.

Regards,

Don

Hi Maria,

It looks I forget to reply your another requirement in the reply yesterday, for your requirement, I can make sure that, for most requirement, if the webedition support that, it should be implemented by the WebAPI edition, because our webedition in 9.0 is implemented by Openlayers library in client side.

Regards,

Don