Hello Meet,
Creating any CODAP component is pretty easy. The plugin sends a message that looks something like this:
{ “action”: “create”, “resource”: “component”, “values”: {“type”: “map”}}
You can specify more properties for the component, but, if you don’t, CODAP will supply default values. These may be good enough.
The Map Component displays points and shapes as layers on the basic map background based on the data in datasets in the current document. It looks among the datasets for attributes named like “latitude” and “longitude” and creates a dot for each case with values set for those attributes. Similarly, it looks for attributes with names like “boundary” or typed “Boundary” and creates a shape for each case with those attributes set.
So, if you want the map to display a point for the location the user set, then you should create a dataset with “latitude” and “longitude” attributes. This is described here, but I think you already have figured that out. Then you would create a case within that dataset. You can modify that case or add new ones, if the user changes location.
I hope this answers your question.
Jonathan