<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>G'day Ben,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm still working through this myself, but some thoughts below. there is a very helpful powerpoint called <FONT class="Apple-style-span" face="Lucida Grande">php_mapscript_mum2.ppt from DMSolutions, google it and get it. </FONT></DIV><DIV><FONT class="Apple-style-span" face="Lucida Grande"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" face="Lucida Grande">Also, bookmark</FONT></DIV><DIV><FONT class="Apple-style-span" face="Lucida Grande"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><A href="http://www.maptools.org/php_mapscript/index.phtml?page=phpmapscript-class-guide.html">http://www.maptools.org/php_mapscript/index.phtml?page=phpmapscript-class-guide.html</A><FONT class="Apple-style-span" face="Lucida Grande"></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>if you haven't already.</DIV><DIV><BR><DIV><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">So far, I can draw the basic map with a country outline. However, I am unable to draw points on the map.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">I have set up the basic map, and added a class and a layer for the points. I then run the following code:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">$image=$map-&gt;draw();</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">$point = ms_newPointObj();</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">$point-&gt;setXY(-21.97, 64.15);</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">$return = $point-&gt;draw($map, $pointsLayer, $image, 0, 'A beautiful point');</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">$return is 0.<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Is there any way I can get further information as to what might be going wrong here, with more detail than just the success/failure methods?</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I might have this wrong, but you seem to have to turn your pointObj into a lineObj to add it to a shapeObj to add to the map. This is how I do it : (the str_replace is to deal with , decimals)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$outbreakshape = ms_newShapeObj(MS_SHAPE_POINT);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>#B<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>now add the points...</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>foreach($dispmappoint-&gt;itemlist as $ob_id=&gt;$locn) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>#B<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>make a point</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$outpoint = ms_newPointObj();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$outpoint -&gt; setXY($locn[1],$locn[0]);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>#B<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Add it to a line object</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$obline = ms_newLineObj();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$obline-&gt;add($outpoint);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>#B<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Add it to our shape</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$outbreakshape-&gt;add($obline);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$dislayer-&gt;addFeature($outbreakshape);<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>#B<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>then add the feature to the map.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Now try drawing it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Apparently the PHP function ms_newMapObj() must have a map file passed to it, although I noticed that the Python version does not. Is there a reason for this? At the moment, I have a dummy map file containing nothing which I have to use.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>No, it doesn't need one (or it didn't @ 4.8) you can just use</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$map=ms_newMapObj('',$mapserver_path);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">If I use something like $layer-&gt;name = 'Layername', the layer name is not set (in fact it is set to null). Using $layer-&gt;set('name', 'Layername') it seems fine. Not really a problem, just wondered why.</FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Others could answer this I'm sure... but although it seems a bit annoying at first, it is great for reusing code. I guess they have one function in the class that sets any variable.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Good luck, and if I have it wrong, I'd be delighted to be corrected, or to see some smarter code.</DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV><DIV>cheers</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ben</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ben Madin</DIV><DIV>REMOTE INFORMATION</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>t : +61 8 9192 5455</DIV><DIV>f : +61<SPAN class="Apple-converted-space"> </SPAN>8 9192 5535</DIV><DIV>m : 0448 887 220</DIV><DIV>Broome   WA   6725</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="mailto:ben@remoteinformation.com.au">ben@remoteinformation.com.au</A></DIV><BR class="Apple-interchange-newline"></SPAN><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"><SPAN class="Apple-style-span" style="white-space: pre; ">                                        </SPAN></SPAN>Out here, it pays to know...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>