Select to view content in your preferred language

Adding .tif file to the Map using PictureFillSymbol

626
1
08-28-2013 06:12 PM
KarenRobine
Frequent Contributor
I have a georeferenced .tif file that I would like to overlay on my map. I was thinking that I would use the PictureFillSymbol for this, but it doesn't seem to work for .tif files. I could overlay .png files however.  Has anyone gotten a .tif file to overlay? Is there possibly a better way to do this?  We have thousands of images, so adding them to a map service is what I don't want to do.

Thanks.
0 Kudos
1 Reply
wangzhifang
Frequent Contributor
I have a georeferenced .tif file that I would like to overlay on my map. I was thinking that I would use the PictureFillSymbol for this, but it doesn't seem to work for .tif files. I could overlay .png files however.  Has anyone gotten a .tif file to overlay? Is there possibly a better way to do this?  We have thousands of images, so adding them to a map service is what I don't want to do.

Thanks.


What you need is ElementLayer, rather than PictureSymbol or custom MarkerSymbol, because ElementLayer could do your work more easily.
FYI 1:http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#ElementLayer
FYI 2:
private void AddPicToMap()
        {
            if (!ELayer.Children.Contains(_image))
            {
                ElementLayer.SetEnvelope(_image, CurrentZCBJ.ImageSpatialExtent);
                //ElementLayer.SetEnvelope(_image, MapObj.Extent);
                ELayer.Children.Add(_image);
                MapObj.ZoomTo((_image.GetValue(ElementLayer.EnvelopeProperty) as Envelope).Expand(1.5));
                OverlayHideText = "HidePicture";
            }
            else
            {
                ELayer.Children.Remove(_image);
                OverlayHideText = "OverlayPicture";
            }
        }

where CurrentZCBJ.ImageSpatialExtent stores your picture's spatial extent.
0 Kudos