Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful publication of local data using MapMint #8

Open
omshinde opened this issue Jun 7, 2017 · 0 comments
Open

Successful publication of local data using MapMint #8

omshinde opened this issue Jun 7, 2017 · 0 comments

Comments

@omshinde
Copy link

omshinde commented Jun 7, 2017

I was trying to publish local data of Mumbai (India) using MapMint. After facing some trivial errors, I was able to publish it successfully. I am compiling the problems and the solutions here.

The MapMint Dashboard can be accessed by: http://localhost/ui/Dashboard_bs.

The steps needed to be followed are as follows:

  1. Download local data: I downloaded the map for Mumbai from OpenStreetMap export module.

  2. The Distiller module in MapMint UI can be used to select and visualize datastores. It shows the PostGIS connections, MySQL data, directories, OGC service clients in the UI. Also, a new directory can be made to store data using the Distiller module.
    The downloaded map was an osm map. To make it a PostGIS connection, I used OSM2pgsql. The OSM2pgsql will convert the map data in the form of points, lines, and polygon and store it in the database. Following command can be used:

osm2pgsql -s -U {Username} -P {Port} -H {hostname} -d {database} /path_to_file/filename.osm

distiller

The Distiller module, after loading the data will look like the above image. As we can see, the map has been transformed to points, line, polygon, and roads. Using Preview option, a particular feature can be seen in the Distiller module itself.

  1. One or more than one feature can be selected from the Distiller module and marked for open selection in manager option. This will introduce the selected features to the Manager module. Initially, all the layers selected in the Distiller will be shown in the navigation bar present on the left side of the screen.

manager_initial

As you choose layers according to your application, you will see that layer displayed over the base map shown in the previous image. Please refer the following image:

manager_selection

It can be seen from the above image that I have chosen the planet_osm_polygon and planet_osm_roads layer. The properties can be changed for display by right-clicking over a particular layer.

Note: It will be helpful to track your project if you will change the name of the project according to your wish and save it.

  1. Once your project is saved and layers are visible on the screen of Manager module, you can move to Publisher module. The Publisher module will help in publishing the project as a web application. The initial state of the screen will be as follows with 4 sections- General, Layers, Map, Services.

publisher_initial

The General information can be filled by the user. Next, is the Layers section which comprises of 2 part- Base Layers and Overlay Layers.

  • Base Layers: The layer which will be at the bottom most of all the layers. All the other layers will be superimposed on this layer. I had used the following options for the first time:

publisher_baselayer_sel

Base Layers can be selected from a lot of available service providers such as Google, ESRI, Mapbox et cetera.

  • Overlay Layers: The layers which will be overlayed on the base layers. I have not selected any option for the overlay layers.

The next section is the Map section. Initially, it looks as in the following image.

map_initial

I changed the settings as in the below image. A user can change these settings according to his convenience.

map_changed

Now, the final section is Services. It includes some controls which again can be changed according to user's need. Next, you have to click on the Publish button present at the top-right part of the screen. Finally, you have to click on the Preview button to see your published project.

I am also appending some images of the published Mumbai map for different selected options.

  1. Polygon and Roads layers over Open Street Map.

final_published

  1. Polygon and Point layers over ESRI World Imagery.

final_published_2

  1. Roads layer on Google Satellite View.

final_published_3

All the projects can be seen at the public instance of MapMint. It can be accessed by following: http://localhost/ui/public/ .


The issues, which I faced and their mitigation:

  1. It needs to be checked whether the host definition is same in the /etc/hosts file and in main.cfg of MapMint. In my /etc/hosts/ file, 127.0.0.1 was defined as localhost. But, main.cfg in /src/mapmint/mapmint-services/ used myhost.net in url definitions. Either all of myhost.net should be changed to localhost or the hosts file in root should be changed.

  2. I was not able to publish the project while using Google Chrome because of script error in JS files. But, it got published easily in Mozilla Firefox. So, please try to publish the project in both browsers.
    The error image is appended below:

console

  1. As it seems in the above image, a change needs to be done in the cfg.js file.
    cfg : /~djay/progede2/public_map/assets/cfg.js should be cfg : /pm/assets/cfg.js. So, how to do this change?
    For this, you have to change the baseUrl in cfg.js to /pm/assets. The file cfg.js is present in mapmint/public_map/assets/js.

I hope this will help in publishing any map data using MapMint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant