Menu
 

Discussion Forums

Map Suite Support and User Discussion

How to Post Source Code and Attachments
Last Post 02-09-2009 04:39 AM by ThinkGeo. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
Topic is locked
Author Messages Informative
ThinkGeoUser is Offline ThinkGeo Support MVP MVP Posts:914 Avatar
--
12-04-2008 12:25 AM

How to Post Source Code

If you need to paste a snippet of source code into your forum message, you can do so easily by using the Format Code Block feature of our forum's visual text editor. This feature will enable you to paste nicely-formatted and colorized code snippets without breaking the layout of the web page, so that others can more easily read your code.

When you are composing your post and want to insert a code snippet, click the "Format Code Block" button on the far right edge of the visual editor toolbar as shown below:

Screenshot

The Format Code Block window will appear:

Screenshot

All you need to do is:

  1. Paste your code snippet into the text box at the top of the window
  2. Choose the code language (for instance, C#) from the "Select Language" dropdown menu
  3. Click the "Preview" button to ensure your code looks as you intended
  4. Click the "OK" button to insert the formatted code into your forum post

We recommend that you do not select "Display Line Numbers" as it will make it difficult for our support team to copy and paste your code.

Here is an example of what your formatted source code snippet will look like:

protected void Button1_Click(object sender, EventArgs e)
{
    if (!Map1.CustomOverlays.Contains("Markers"))
    {
        // Add a new feature as a marker
        Map1.MarkerOverlay.Features.Add("Marker", new Feature(0, 52));
 
        // Set the marker style, and make it available all over the zoomlevels.
        Map1.MarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage = new WebImage("../../theme/default/img/marker_blue.gif", 21, 25);
        Map1.MarkerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
    }
}

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

Tags: source code, code tags, forum help, attachments
ThinkGeoUser is Offline ThinkGeo Support MVP MVP Posts:914 Avatar
--
02-09-2009 04:39 AM

How to Post Attachments

If you need to post more than a brief snippet of code, or would like to upload an entire file of source code for our support team to review, you can use the attachment system.

To attach a file to a post you're writing, scroll down below the Submit button until you see the "Attachments" panel, then click the arrow on the right side to expand it. Then you'll see these controls:

Attachments Panel

Simply select "Browse," find the file you want to attach, then press "Upload." The file you attach will appear at the end of your post once it is submitted, with a link to download it. If you attach an image, you'll optionally be able to insert it into your message.

Please observe the following limitations when attaching files:

  • Up to three files can be attached to each post.
  • Attached images can be no larger than 640 pixels wide and 1024 pixels tall.
  • Each attached file must be less than 250 KB in size.
  • Only files with the following extensions are allowed:
    • .bmp
    • .c
    • .cpp
    • .cs
    • .csproj
    • .doc
    • .docx
    • .gif
    • .h
    • .htm
    • .html
    • .jpg
    • .js
    • .pdf
    • .png
    • .sln
    • .txt
    • .vb
    • .vbproj
    • .xaml
    • .xml
    • .zip

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

Topic is locked