[mapserver-users] addfeature - point appearing at center of map?
Stepan Kafka
stepan.kafka at centrum.cz
Tue Jul 9 13:18:37 PDT 2002
What projection has your map set? And what is the extent of this? Please,
check the relation between map and layer projections.
Stepan Kafka
> -----Pùvodní zpráva-----
> Od: owner-mapserver-users at lists.gis.umn.edu
> [mailto:owner-mapserver-users at lists.gis.umn.edu]za uivatele Debbie
> Pagurek
> Odesláno: 9. èervence 2002 20:36
> Komu: mapserver-users at lists.gis.umn.edu
> Pøedmìt: [mapserver-users] addfeature - point appearing at center of
> map?
>
>
> Hi,
> I have created an application that adds points to the map
> "on-the-fly". It makes use of a layer outlined as follows in the
> map file:
>
> LAYER
> NAME COLLECTIONS
> TYPE POINT
> FEATURE
> END
> STATUS ON
> TEMPLATE VOID
> CLASS
> SYMBOL "circle"
> SIZE 5
> COLOR 255 0 0
> END
> PROJECTION
> "init=epsg:4326"
> END
> END
>
> For some reason, in addition to the points I am adding
> dynamically using php/mapscript, there is a point showing at the
> very centre of the map (the map is 600 by 300, so the point is
> appearing at 300, 150) or a point is appearing at 0 lat, 0 long
> even though I have NOT coded this at all. I can't figure out how
> to get rid of this point on my maps!
>
> here's a bit of code:
> // loop through records and display (addfeature) each point
> $dummylayer=ms_newLayerObj($map); //a new layerobject
>
> $numrows = count($long);
> for ($i = 0 ; $i <= $numrows; ++$i)
> {
> $oShp=ms_newShapeObj(MS_SHP_POINT);
> $oLine=ms_newLineObj();
> $oLine->addXY($long[$i],$lat[$i]);
> $oShp->add($oLine);
> $dummylayer=$map->getLayerByName("COLLECTIONS");
> $dummylayer->addfeature($oShp);
> }
>
> Anyone have any ideas why this point is appearing in the centre?
>
> Thanks,
> D. Pagurek
>
>
>
More information about the MapServer-users
mailing list