Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    MehdiRahmati
    @MehdiRahmati
    by add a mapviwer to form in runtime , this error apears:

    "An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Map____13.exe

    Additional information: Could not load file or assembly 'MapSurfer.Core, Version=2.50.6047.3032, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

    other approaches did not work and this error raised:
    Capture.JPG
    MehdiRahmati
    @MehdiRahmati
    have any one ever used mapsurfer 2.5 in vs2015?
    sorry for my mistakes in english
    MapSurfer-NET
    @MapSurfer-NET
    Have you copied Native.x86 folder to your Debug\Bin directory
    ?
    if it does not help, you can send me your project. I will take a closer look.
    MehdiRahmati
    @MehdiRahmati
    yes i copied this folder . my project is empty. i tried to test mapsurfer for first time and encountered to that errors. how i can send you my project ? thank you for your attention.
    MehdiRahmati
    @MehdiRahmati
    i put my project in the dropbox. the link is:
    password of file is: 123
    This message was deleted
    thanks again
    MapSurfer-NET
    @MapSurfer-NET
    ok. thanks. I will take a look
    MapSurfer-NET
    @MapSurfer-NET
    hi Mehdi. Please follow my steps to resolve the issue
    1. In Program.cs replace "new Form1()" with "new MapSurfer.Samples.frmMain()"
    2. In project References -> MapSurfer.Core, set Copy Local to True.
    3. In Bin\Debug directory, remove Runtime section both in MapSurferTest.exe.config and MapSurferTest.vshost.config
    4. Recompile project
    MehdiRahmati
    @MehdiRahmati
    hi. thank you very much. i was in vacation two day past and today i tested it. unfortunatly it raised an error again. it is very questionable that anyone don't test this package on vs2015? why procedure of install and run mapsurefer is very difficult? why i am unable to do this? there is no way to simplify and facilitate this procedure? i use DotSpatial, Sharpmap, Mapsui and other package simply by use NuGet and with no problem. i am very curious to test MapSurfer so continue trying !
    Capture.JPG
    this error raised in AssemblyLoader.cs class.
    Maxim Rylov
    @Rungee
    Assemblyloader is not able to load newtonsoft.json library v8.0.0. Check exception detsils. Mapsurfer requires and has newtonsoft.json v7.0.0. Have you done step 3 in my previous message? You might still have a reference to v8.0.0 which is automatically added by vs2015.
    MehdiRahmati
    @MehdiRahmati
    hi Maxim, yes i have done. i check it now. thanks.
    Ok, it works.
    MehdiRahmati
    @MehdiRahmati
    thanks, but is there a way to simplify this procedure?
    also i can't add mapviewer and some of other controls in design mode to my form.
    Capture.JPG
    Maxim Rylov
    @Rungee
    You are welcome. In the next release, I will try to make the whole procedure more simple.
    MehdiRahmati
    @MehdiRahmati
    thank you very much maxim. you can do it certainly.
    Danny Warren
    @dannydwarren
    Is this an appropriate place to ask questions about hosting OSM tiles using MapSurferNET?
    MapSurfer-NET
    @MapSurfer-NET
    Hi Danny. Yes, this is the right place to ask.
    Danny Warren
    @dannydwarren
    Awesome. I am trying to use OSM tiles hosted via MapSurferNET. I have installed MapSurferNET and I'm about to standup the service in IIS. However, I'm missing a critical part and I'm not really understanding how to get OSM data as the data that's being served up. There are a lot of options to download OSM data (We only need Countries and Cities (Streets and Addresses are NOT required) but I don't understand what I'm looking at. I guess my question is really how do I get PBF data into MapSurferNET as tiles or so MapSurferNET can create tiles? I'm struggling to find posts/information that help me accomplish this work.
    Maxim Rylov
    @Rungee
    Hi Danny. PBF is not the best choice for visualizing just countries and cities. Which region we are talking about? globe ?
    Danny Warren
    @dannydwarren
    Yes, globe
    with about 4 levels of zoom required
    If full zoom is supported that's OK, but I understand that's a lot more data.
    Maxim Rylov
    @Rungee
    I see. First of all, I would suggest to use only appropriate data formats and data sets. For countries, I can recommend OSM data extracts available at http://openstreetmapdata.com/
    Places you can download from http://www.naturalearthdata.com/.
    To host a map in IIS, you need a map style which can be made in MapSurfer.NET Studio (an alternative to Tilemill, Maperitive, etc)
    Danny Warren
    @dannydwarren
    OK, so I looked at the provided links and must confess I have little idea what each is talking about in terms of what will actually be shown. Would I want to combine this for Countries: http://openstreetmapdata.com/data/land-polygons and this for Places: http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-populated-places/
    Danny Warren
    @dannydwarren
    After downloading those two data sets there is a mixture of .cpg, .dbf, .midx, .prg, .shp, and .shx files. When I'm in the MapSurfer.NET Studio v2.5 I add a Styled Layer of of Datasource Provider: Shape and point to the .shp file. The project window in the Studio is still blank. Is there a different Datasource Provider I should be using? I have been unsuccessful finding documentation on how to work with layers in MapSurfer.NET Studio.
    MapSurfer-NET
    @MapSurfer-NET
    With shapefiles, you have chosen the right direction.
    Which project do you use in Studio, native or cartocss?
    Anyway, in both cases you need to create styles for each layer you added. Styles describe how you want the data to be displayed.
    Danny Warren
    @dannydwarren
    In Studio I have created a new Native project. In the Project Explorer I have added the shape files from both downloads mentioned previously. One named Land and the other Cities. Both are checked. However the project window is still blank. What am I missing to load these shape files in to Studio so I can create the map style you've mentioned?
    Not sure if it's helpful but here are the output from the Event Logs window:
    [10:05:19.021] Rendering layer 'Land' ...Done.
    [10:05:19.031] Rendering layer 'Cities' ...Done.
    [10:05:19.034] Start label placement...
    [10:05:19.038] Label placement process has been finished. Labels = 0 (0)/0/0, Percentage = 0.00%, Result = LocalOptimal, Time = 00:00:00.0000019, Iterations = 1
    [10:05:19.043] Quality Value : 0.00000
    [10:05:19.048] Finish map rendering.
    Maxim Rylov
    @Rungee
    For each layer, you need to so called symbolizers through Layer->Styles->Rules->Symbolizers. Countries require PolygonSymbolizer, places GraphicTextSymbolizer. Check out a Github repository containing some map projects.
    https://github.com/MapSurferNET/MapSurfer.NET-Examples
    Danny Warren
    @dannydwarren
    Thanks that's helpful. This project could really benefit from walk through documents. I was able to get the Capitals demo running. After analyzing that demo and adding the similar Symbolizers in I am still unsuccessful at getting anything to show up for the shapes I downloaded. I'm beginning to think that getting our own Slippy Map Tile Server up and running is not going to be possible. We're currently looking into using https://www.mapbox.com/ instead.
    Philip
    @pcrockett
    Hello, I'm trying to get started with MapSurfer, but it's starting to look like my use case isn't really documented or supported. I'm trying to programmatically control the styling of a map, and read layers directly from Shapefiles or Spatialite databases. The impression I'm getting is that I can't do that, and I need to download software and set things up manually through a GUI. Is that right?
    Maxim Rylov
    @Rungee
    Hi Philip. It is not entirely true. There are several ways of specifying map styling in MapSurfer. You can do it either by using a predefined map style written in CartoCSS, SLD, native xml format or add Styles->Rules->Symbolizers programmatically.
    Maxim Rylov
    @Rungee

    For the second approach you need to accomplish the following steps:

    1. Create layer
    2. Create and initialize data source provider
    3. Assign the provider to your layer
    4. Specify styling for your layer

    Below you can find an example of these four steps.

    StyledLayer layer = new StyledLayer("layer1");
    ParameterCollection parameters = new ParameterCollection();
    parameters.Add(new Parameter("Type", "Shape"));
    parameters.Add(new Parameter("File", your-path.shp));
    IDataSourceProvider provider = DataSourceProviderManager.CreateInstance(parameters);
    provider.Initializer(...);
    layer.Datasource = provider;
    Style style = new Style();
    Rule rule1 = new Rule();
    rule1.Filter = "[name] != null";
    LineSymbolizer symLine = new LineSymbolizer();
    symLine.Stroke.Width = 2F;
    rule1.Symbolizers.Add(symLine);
    layer.Styles.Add(style);

    map.Layers.Add(layer); // add layer to the map
    map.Render()...;

    Maxim Rylov
    @Rungee
    Check out http://mapsurfernet.com/docs/usermanual/styling/ for further details regarding symbolizers parameterization
    managerger
    @managerger
    dead community?