Dynamic map layer with Mapserver's C# MapScript -
I am preparing a web app that will show the location of a project on a map. This function adds data to me that I want to show on a map layer.
Protected Zero AgregarPunto (DataTable results) {layerObj thislayer = util.MSMap.getLayerByName ("poi"); Forex (resulting Detaro Dr.) (Akritiobij shp = new size Ojj (Makroskript. Msaisacac_ P_POINTM); Shp = shapeObj.fromWKT (Dr. [ "the_geom"]. ToString ()); thislayer.addFeature (SHP);}} it was a reunion of people # Mpesr IRC channel, but it does not work! Why are not shown there can not locate that points ???
Do you create a classObj and style obz for your layer?
Here is my code sample:
myLayer.type = OSGeo.MapServer.MS_LAYER_TYPE.MS_LAYER_LINE; MyLayer.status = 1; MyLayer.symbolscaledenom = 1; // a mapping class Osjio. Mapasrrhwar. Class Obj Maiclas = new Osjio. Mapasrrhwar. Create Class Obj (Mayleyr); // a style Osjio. Mapsservr. styling Ojj style = new Osjio. Mapasrhwar. styling create Obj (Maiklas); // unit color = new color (12, 34, 56); Int red = convert .toInt32 (unit color .r); int green = convert toint32 (unit color .g); int blue = convert toint32 (unit color. B); Style.color.setRGB (red, green, blue); Style.outlinecolor.setRGB (255, 255, 255); //style.symbol = _map.symbolset.index ("circle"); // Here '_map' is an example of the map oz, this line is not strictly required style.size = 10; Style.minsize = 3; // Change it to your needs
Comments
Post a Comment