Global Mapper v25.0

labeling and ploting

deepakin
deepakin Global Mapper User
edited January 2010 in Technical Support
Hi mike...

i need a help from you. am having a sample map in tif format. i succesfully load tat in my sample project using globalmapper SDk. now my requirement is to plot some location points in that map. can u provide me the sample code for plotting and labeling in an tif image using xml(any format).

awaiting for your help. coz i have tried lot to plot my points in map. but i cant get the output.. :confused::confused::confused:

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2010
    I'm not sure what you mean by using XML for this, but you can simply create a custom vector layer using the GM_CreateCustomVectorLayer call, then add a point feature at the desired location to place a label using the GM_AddPointToVectorLayer function. There are samples of using these functions in the GM_MapWindow.cpp file in the C++ sample application.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • deepakin
    deepakin Global Mapper User
    edited January 2010
    ok i saw a sample using CSV format. i wil try on that. am using c#. if possible u provide me sample for ploting csv format locations in map
  • global_mapper
    global_mapper Administrator
    edited January 2010
    You can either use the GM_LoadGenericAsciiTextLayer function to load the CSV file into a new layer and provide the formatting options, or you can read in the CSV file yourself, then use the GM_AddPointToVectorLayer function to add each point as you read it.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • deepakin
    deepakin Global Mapper User
    edited January 2010
    hi mike

    :(me strugling with loading CSV files for locating points in my map. loading map is working properly. plz give me sample code for how to load csv files to my map. i tried with both GM_AddCustomSymbol and GM_AddPointToVectorLayer but its not working:mad::mad:. plz provide me some sample code:confused:
  • global_mapper
    global_mapper Administrator
    edited January 2010
    I have updated the C# sample application at http://globalmapper.com/developer/SDK_Sample_CSharp.zip to include declarations for the ASCII import types and a sample LoadCSVLayer function that demonstrates how to load a CSV file like you have into a new layer.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • deepakin
    deepakin Global Mapper User
    edited January 2010
    yes i got now:):), i did mistake in GM_Projection_t class while loading points in map.. now its working wel.
    i have an doubt
    for wat purpose u having Test API and then
    i need zoom in and out option in my map. for that which class i have to use
  • global_mapper
    global_mapper Administrator
    edited January 2010
    The TestAPI function is just to demonstrate how to do some things with the SDK. This is not something that you need to do in your application.

    The zoom in and out (as well as panning) are controlled entirely by the GM_Rectangle_t that you pass into the GM_DrawLayerList function. The C# sample application has zooming and panning implemented by adjusting the view bounds rectangle that is drawn.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com