Drawing new points using the JSAPI interface
Bird, Derek (xwave)
Derek.Bird at XWAVE.COM
Fri Feb 3 06:26:34 PST 2006
Good morning,
Trying to draw a few points on the map using JSAPI, and am having no
luck....
I added this code to the onLoad function: (This works)
goCWCJSAPI.oMap.CreateNewLayer("Sensors","POINT"); //
This returns TRUE however nothing is plotted.
Then I added a button the the page, that calls a function plotIt()
apoint=new CWCPoint();
apoint.x=77.0000;
apoint.y=18.00;
apoint.symbol_size=1;
apoint.font_color="10,10,10"; // some random colour
worked=goCWCJSAPI.oMap.AddPoint("Sensors",apoint);
alert(worked);
I know having a database connection is an option, however for a quick demo,
I just want to add a bunch of points using javascript from a different
application. Can someone tell me what I am missing to plot points?
Regards,
Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060203/d39a2ab5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3084 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060203/d39a2ab5/attachment.bin>
More information about the MapServer-users
mailing list