# Introduction

Welcome to the MapHubs Help Knowledge Base!

{% tabs %}
{% tab title="Getting Started" %}
New to MapHubs?

{% content-ref url="/pages/-L97P9mdgi4WMPGN\_YYu" %}
[Signup for a MapHubs Account](https://help.maphubs.com/getting-started/signup-for-a-maphubs-account)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mfPm52f1aQL8gE" %}
[Make a Map](https://help.maphubs.com/maps/make-a-map)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mg8ny9\_4n6LgCu" %}
[Uploading Data](https://help.maphubs.com/data/uploading-data)
{% endcontent-ref %}

{% content-ref url="/pages/-LIDL0vQymcN9Ynd3z8p" %}
[Sharing Maps](https://help.maphubs.com/maps/sharing-maps)
{% endcontent-ref %}

{% content-ref url="/pages/-LBd5oYFNI7PRrdi9rxb" %}
[MapHubs Groups](https://help.maphubs.com/getting-started/groups)
{% endcontent-ref %}
{% endtab %}

{% tab title="Make a Map" %}
{% content-ref url="/pages/-L97P9mfPm52f1aQL8gE" %}
[Make a Map](https://help.maphubs.com/maps/make-a-map)
{% endcontent-ref %}

{% content-ref url="/pages/-LIDL0vQymcN9Ynd3z8p" %}
[Sharing Maps](https://help.maphubs.com/maps/sharing-maps)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mg8ny9\_4n6LgCu" %}
[Uploading Data](https://help.maphubs.com/data/uploading-data)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mjJBjayBKL\_37\_" %}
[Layer Metadata](https://help.maphubs.com/data/layer-metadata)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mhlrloFlbQTyEb" %}
[Change the Layer Color](https://help.maphubs.com/maps/change-the-layer-color)
{% endcontent-ref %}
{% endtab %}

{% tab title="Advanced" %}
{% content-ref url="/pages/-LIDP-oJ8LE4dqEYsw-L" %}
[Forest Report](https://help.maphubs.com/forest-analytics/forest-report)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9miZG5TBurqWKco" %}
[Attach Photos to Map Features](https://help.maphubs.com/data/attach-photos-to-map-features)
{% endcontent-ref %}

{% content-ref url="/pages/-L97P9mmScOegY8M77dT" %}
[Data-Driven Map Styles](https://help.maphubs.com/advanced/data-driven-map-styles)
{% endcontent-ref %}
{% endtab %}

{% tab title="Common Issues" %}
{% content-ref url="/pages/-L97P9moNn52UU9j4xNi" %}
[Troubleshooting Common Issues](https://help.maphubs.com/getting-started/troubleshooting-common-issues)
{% endcontent-ref %}

Please contact us at <support@maphubs.com> if you need help!
{% endtab %}
{% endtabs %}


# Signup for a MapHubs Account

All MapHubs websites now use a centralized login called MapHubs Account. You only need to register once, then you can use your login on any MapHubs site including public sites like [Map for Environment](https://mapforenvironment.org/)&#x20;

{% hint style="danger" %}
We have remove support for Google and Facebook login from MapHubs Account logins. If you previously created an account using Google or Facebook please contact <support@maphubs.com> for assistance migrating your account.
{% endhint %}

{% hint style="info" %}
Most MapHubs websites require an invitation from the site owner and do not have a public signup option. If you need access to a MapHubs site for your organization/project, please contact the site owner or send us a message at <support@maphubs.com>
{% endhint %}

## Registering with an invite link

#### Step 1: Click the invite link you received in your email.&#x20;

After you click the link you will see a login page like this

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LuFKY1FMrXZ-JhHAr0Q%2F-LuFOSiQ1t3Niw-hKJjc%2Fimage.png?alt=media\&token=e199a578-588f-4b90-922b-aac75635763c)

#### Step 2: Login or signup

If you already have a MapHubs Account linked to this email address, just login with that account.

{% hint style="info" %}
If you are not sure if you have an account already or need help finding your user name or resetting your password, send us a message at <support@maphubs.com>
{% endhint %}

If this is your first time using a MapHubs site, signup for a new account by clicking the Sign up button

![Choose to sign up for a new account](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LuFKY1FMrXZ-JhHAr0Q%2F-LuFOD-oPtXRlE3OPe1V%2Fimage.png?alt=media\&token=121bd881-a655-44e9-acba-de8c637a59a4)

{% hint style="warning" %}
It is important that you signup with the same email address that received the invite email, otherwise we won't know that it is you.
{% endhint %}

Now choose a username and password

![Choose a user name and password](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LuFKY1FMrXZ-JhHAr0Q%2F-LuFOmPOjeilOXBl0ETe%2Fimage.png?alt=media\&token=c475df9e-f70e-4a82-a0d7-48b72b17bb27)

That's it, you will now be redirected to the MapHubs site.

## Registering on a public site

### Step 1: Go to the registration page (public sites only)

In this example we are showing Map for Environment.

Go to: <https://mapforenvironment.org/signup>

Click the "Sign Up" tab if it is not already active

### Step 2: Complete the sign up form

**Register using an email address**

Complete the registration form providing a username, email address and password.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PDW46DV6Hze-OHMr%2Fmaphubs-signup-3?generation=1522707007975452\&alt=media)

### Step 3: Confirm Your Email

(Only if you registered using your email)

Look for an email from <info@maphubs.com> and click the confirmation link in the email. If you don't see the email immediately, please wait a few minutes for it to arrive.

After confirming your email, you should see a confirmation message.

Now you can go back to the MapHubs site and login.

### Step 4: (Optional) Change your Profile Photo

If you registered using your email your MapHubs profile photos uses Gravatar. Follow the instructions at [http://en.gravatar.com/support/how-to-sign-up/ ](http://en.gravatar.com/support/how-to-sign-up/)to create an Account and add your profile picture. If you have setup your Gravatar photo in the past it will automatically used by MapHubs.

We plan to add more user profile support in the future, please check back for updates.


# MapHubs Groups

## What is a Group?

Groups in MapHubs help you organize layers, maps, and hubs based on teams or project. How you organize your content is completely up to you, you can create as few or as many groups as you want.&#x20;

A group has members that can collaboratively edit the content of the group. Group administrators can add/remove members of the groups and edit group attributes like the name, description, and image/logo.

{% hint style="danger" %}
Groups do not limit who can **view** the content in the group, only who can **edit** that content. MapHubs can be configured as a private invite-only site if you need to restrict who can view content. [Contact us](mailto:support@maphubs.com) for more information
{% endhint %}

## Create a Group

**To create a group**

1. Click *Explore* then *Groups* from the top of the page, or click on your user name in the top right of the page and then click *My Groups*
2. Click the new group button in the bottom right of the page

#### Choose a Group ID

The group id is a unique name used to identify your group, think of it like a user name for your group. It is used to identify content from the group in MapHubs.

{% hint style="warning" %}
It is not possible to change the group ID, however you can make as many groups as you want with different IDs
{% endhint %}

#### Enter a Group Name

Enter a short descriptive name for the group

#### Enter a Description

Enter a description for the group, this will display on the group profile page.

#### Enter a Location

Enter the location of the group data, this will display on the group profile page and helps users understand where in the world the group's content is focused.

#### Upload a Group Image/Logo

Uploading a photo is optional but recommended. The logo is converted to an icon that displays on group content to help you stay organized.

## Managing Groups

To manage a group click the menu in the bottom right of the Group page, then choose the *Manage* option. You must be a group administrator to manage a group.

![Choose the Manage Group option from the menu button on the group page](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LCdwBY31gzBSQNS63sv%2F-LCdwE6mVRnJ1uIcz5f6%2Fimage.png?alt=media\&token=f2b01812-ac96-4430-8d0b-3c1dfbc84f32)

### Adding Group Members

{% hint style="warning" %}
To add a member they must first be a member of the site, and you will need to know their user name
{% endhint %}

Beginning typing their user name, and choose it from the list of options. Optionally click the toggle to make them an administrator.&#x20;

The user will receive an email notifying them that they have been added to the group.

![Group Members](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LCdwBY31gzBSQNS63sv%2F-LCdwUnGlVba-WYxgtNd%2Fimage.png?alt=media\&token=1ba2957b-8884-4928-8d0b-1969758d31b4)

### Removing Group Members

Click the remove icon next to the user's name to remove them from the group. They will no longer have permission to edit content in group, including content they created.

![Removing Group Members](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LCdwBY31gzBSQNS63sv%2F-LCdwblD2zeRH2cUCdCs%2Fimage.png?alt=media\&token=ed52426e-a6ae-4df7-9924-2ec512df988f)

### Deleting the Group

From the menu in the bottom right of the page, choose the *Delete* option

{% hint style="danger" %}
To delete a group you must first delete all of its content. Deleting a group cannot be undone.&#x20;
{% endhint %}

{% hint style="info" %}
Site administrators can reassign layers to a different group via the *Admin* tab on the management page for a layer
{% endhint %}


# Searching MapHubs

You can search all the content on MapHubs including individual map features.

## Searching

1. Click "Search" or click the search icon in the top right corner of the page
2. Enter your search term into the box and press enter. We recommend searching for a keyword such as "mining" or "congo".&#x20;

## Results

If results are found inside feature attributes, the features will be displayed on the map. Click on a map feature to see all of its attributes and to see the layer it belongs to. Clicking on the name of the layer will take you to that layer's page.

If results are found in MapHubs content like Maps, Layers, Groups, and Hubs, cards for those results will be displayed below the map. Clicking on a card will take you to the page for that item.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PCS0MBLaF-AirzGH%2Fsearching-maphubs-1.png?generation=1522706996680437\&alt=media)


# MapHubs Terminology

**Group**

MapHubs datasets (Layers) are organized into groups. Members of a group can upload new layers into the group or modify existing layers.

Anyone can create a new group and add other users to the group. Adding a user as an administrator allows them to also add/remove other users.

**Layer**

A MapHubs layer is a single dataset intended to be overlaid on a map. The data that comprises a layer is often determined by the imported dataset (e.g. GIS Shapefile) that was used to create the layer. However, the way map features are divided is up to the user. For example, a global dataset could be divided into one dataset per country prior to loading into MapHubs. You can also create empty layers in MapHubs and then trace data on top of satellite imagery.

More formally, a layer is a collection of one or more spatial map features (points, lines, or polygons). MapHubs requires a layer to contain either points, lines, or polygons.

When working with layers you may also encounter the following terms:

* Feature - a single point, line or polygon inside the feature
* Field / Attribute - Attributes are the data fields (or data properties) associated with a map feature. They are often used to provide a name, or a landuse classification type.
* Source - The orginal data source of the layer, e.g. author or organization to which the data is attributed
* Description - a short description of the layer's contents or purpose
* License - The license (if known and provided) of the data. For open data licenses, this describes how you are allowed to use the data, if you are required to release modifications, and if you are allowed to use it for commercial purposes.
* Labels - Text labels that display over the data on the map.
* Legend - The map legend is used to identify the data being displayed on the map. Each layer has a legend entry that includes the symbology used to show the layer, the name of the layer, and the layer's group and source information.

**Map**

One of the primary goals of MapHubs is to make maps that tell a particular story. A map in MapHubs is any combination of one or more Layers saved along with a location and a choice of base map. You can share this map, embed it in a story or your website, or export it as a PNG image.

Anyone can create map in MapHubs, you just need to register for an account in order save your map.

**Story**

You can think of a MapHubs story as a news article or a blog post. You can write your story, format the text, and embed maps and images.

**Hub**

A MapHubs hub is a mini website, intended to help you present all of your content for a topic or project. A hub has a map, stories, and a resources section that can be used for notes or links to external resources.


# Troubleshooting Common Issues

## Maps are not loading or are not displaying at all

### 1) Check your web browser

This is usually caused by not having a recent web browsers with the latest updates. MapHubs is designed to work with the latest versions of Chrome and Firefox (Mac, PC, iOS, Android), and Safari (Mac and iOS). It should also work with the new Microsoft Edge browser, and the Opera browser. **Internet Explorer is not supported.**

#### Update to the latest version

We recommend checking that your browser is automatically updating to the latest version, this is usually found in the Help menu, under About. Keeping your browser up-to-date is also extremely important to protect against malware and viruses, so it is worth double-checking.

Here are more detailed instructions:

* Chrome:&#x20;

  <https://support.google.com/chrome/answer/95414?co=GENIE.Platform%3DDesktop&hl=en>
* Firefox:&#x20;

  <https://support.mozilla.org/en-US/kb/find-what-version-firefox-you-are-using>

#### Check that WebGL is enabled

Go to <https://get.webgl.org/> You should see a spinning cube, if not, follow the steps about to update your browser, and/or follow the support site link provided by webgl.org

MapHubs uses WebGL, video-game style graphics rendering that runs directly in the browser. This allows us to provide dynamic mapping tools without all the network bandwidth and expensive cloud infrastructure needed by previous generation web mapping technology.

If WebGL is the issue, and your browsers are up-to-date, it may also help to check for OS and video card driver updates.

Additional diagnostic information can be found by going to <http://mapbox.github.io/mapbox-gl-supported/diagnostics>

If you are still having issues please contact us at <support@maphubs.com>

### 2) Check your network configuration (less common)

Less common are network issues that block MapHubs map data.

**Try a different network**

We have seen a rare issue with public connections or VPN connections blocking the map traffic.

* Try a different WiFi access point
* If your are using a VPN service try disabling it
* If you are on a public connection (coffee shop or hotel), try using a VPN&#x20;

**The technical details**

MapHubs uses a new map data format called Mapbox Vector tiles. These files have a .pbf file extension and are in a format called a Protocol Buffer.

Internet firewalls can be configured to block all unknown traffic, and in that case may block MapHubs data.

If you do confirm that a corporate firewall is the cause, we are happy to provide the firewall's administrator with additional technical details.

## Unable to login to my account

#### Password Reset

First try resetting the password, you can click the forgot password link at the bottom of the login form, or go to the forgot password page on any public MapHubs site like <https://mapforenvironment.org/forgotpassword>

#### Facebook/Google Login

If you previously used Facebook or Google to login, you will need to do so again, or register a new account using an email address. If you previously created an account with an email and password, you cannot access the same account using your Facebook/Google account as we do not yet support linking your Facebook/Google account to an existing email account.

## Other Issues

Still having issues, contact us at <support@maphubs.com>


# Make a Map

**Making a map with MapHubs is simple and easy.**&#x59;ou don’t need to know fancy GIS software. You can find data layers in the database, choose your own color, add titles, and voila, you have an interactive map! You can then embed your map in a website, download it as an image, or share it across social media.

**Follow the steps below and you’ll have a map in minutes!**

## Opening the map maker

{% hint style="info" %}
How you access the map maker may be different,  depending on how the MapHubs site is configured,  some of the options may not be available, or may not be available until you login
{% endhint %}

All the ways you can access the map maker

* Click *Make a Map* at the top of the page
* Click *Explore* at the top of the page, then *Maps*, then click the new map button in the bottom right corner of the page
* Click your user name in the top right of the page to open the user menu, then click *My Maps*, then click the new map button in the bottom right corner of the page
* Click *Explore* at the top of the page, then *Groups*, click a group you are member of, then click *Make a Map*

## How to use the map maker

There are two tabs in the map maker, *Add a Layer* and *View Map*. You will start in *Add a Layer* since the map is empty, however you can switch tabs at any time.

![Switch between adding a layer and viewing the map](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBcw1Qek9-EjVh_dSu5%2Fimage.png?alt=media\&token=40cd2587-68be-4a6b-98c0-97b162c6a1ab)

The left column of the map maker lists the layers currently in your map, and allows you to save your map.

![Map maker left column with an overlay layer](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBcwgDEqY_HXygO37bL%2Fimage.png?alt=media\&token=fff55f9f-987f-4ea3-bea7-faa7778d32cb)

To get started, add a layer in the *Add a Layer* tab.

## Adding a Layer

Clicking on a layer in the Add Layer tab will add the layer to the map.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBcxJkGRM1rY2LicpAn%2Fimage.png?alt=media\&token=cc282b5d-e02a-4807-8313-4989e855bc38)

You can also search for layers by keyword using the search box. For example, to find 2017 forest cover layers we searched for  "2017 forest".

{% hint style="info" %}
To find layers they must first me added to your MapHubs site. ,&#x20;

* Layers from public MapHubs sites like <https://mapforenvironment.org> can easily be added to your site in a matter of seconds
* Uploading a data file like a Shapefile, KML, or CSV takes only a few minutes, see [Uploading Data](https://help.maphubs.com/data/uploading-data)
  {% endhint %}

If you add a layer you don't want, it is easy to remove it using the remove layer button.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBcymXHiUm2IlvsNBSc%2Fimage.png?alt=media\&token=4b32b850-786a-4e7d-a5c6-fdb3fcc74d0e)

## Viewing the Map

View the map using the *View Map* tab.

{% hint style="info" %}
The position, zoom, and base map you choose will be saved when you save the map, so the map will always look exactly like the way you left it.
{% endhint %}

### Moving the map

Move the map using the mouse

### Zooming the map

Zoom the map using the scroll feature of your trackpad (or wheel of your mouse), or the zoom-in and zoom-out buttons. On touch device like a phone or a tablet you can use the pinch-zoom gesture.

![Map zoom buttons](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBczOgS1ih8X1pkT-f4%2Fimage.png?alt=media\&token=f26e0a6d-b2ea-43fa-bdcd-cdb3d02c13d0)

### Changing the base map

Click the map tools button in the top right corner of the map, then select a new base map.

{% hint style="info" %}
When you save the map it will remember your choice of base map
{% endhint %}

![map tools button](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBczqRIGs1lnV_yjLBg%2Fimage.png?alt=media\&token=792168db-f11a-4851-b4e2-2f7ce411f229)

![Choose a base map](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBd-1GrhfafiiplF73D%2Fimage.png?alt=media\&token=6861f3d9-08d0-4eb1-b21c-584b5d795420)

{% hint style="warning" %}
The available base map options may vary depending on the MapHubs site. If you'd like to customize the base map options [contact us ](mailto:support@maphubs.com)
{% endhint %}

## Customizing Layers

After adding layers to the map you can customize them in the column to the left of the map. This includes changing the order of the layers, the color of a layer, enabling map labels, or removing the layer from the map. You can also hide a layer from displaying on the map.

### Layer Order

You can drag and drop layers to reorder them.

While most layers in MapHubs are partially transparent by default, it usually helps to put the more important data on the top of the map, or to put point or line data above polygon or raster data. Play with different layer order to find one that looks the best.

### Layer Visibility

You can hide a layer with the visibility button. A hidden layer will not show by default on the map after it is saved, but can be enabled from the legend menu.

{% hint style="info" %}
In most cases, you should remove layers you don't want in your map instead of just hiding them. However it is useful in some cases to collect layers into a map for layer analysis.&#x20;

It is possible through the advanced map settings, to enable drop down menus above the map to list layers for the user to choose from and enable. [Contact us](mailto:support@maphubs.com) for help with advanced map settings.
{% endhint %}

### Layer Style

{% hint style="warning" %}
Not all layers can be changed. Raster layers and certain layers from external sources cannot be changed since they are styled and rendered externally from MapHubs.
{% endhint %}

Use the style button (color palette icon) under a layer to open the style panel for that layer.

![Access style settings for a layer](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBd2uvUdV6WCMlyQqu-%2Fimage.png?alt=media\&token=b6292132-0223-4121-9875-3039387c7c4f)

When you are finished, use the close button at the bottom of the layer style panel to exit the layer style for the selected layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBd3A8dFcyASU33LowK%2Fimage.png?alt=media\&token=42dd6e3f-3b5b-44bd-856f-bc76e854b5cf)

#### Changing Color

To change the color, click on a color in the color palettes, or use the *More Colors* tab to pick any color you want.

![Color Palettes](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBd3RoMrt77kBW6Z0WK%2Fimage.png?alt=media\&token=f1442421-ff09-4df6-a524-c360bb2540d3)

{% hint style="info" %}
You can change the transparency of the color using the slider in the More Colors tab
{% endhint %}

![More Colors - changing the transparency of a color](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBczev7AaWG7NNPVOwZ%2F-LBd3q9DFD60vr0X-fUH%2Fimage.png?alt=media\&token=7d21e4ae-0aed-4ca5-b92f-1af83c82cd66)

#### Setting a Label

Click on the label tab, turn on labels (using the toggle switch) and then pick the field to display from the drop-down.

#### Setting a Map Marker Icon

Point layers can have a marker icon. From the marker menu click the toggle to enable markers and then choose a style, size, and optionally an icon.

### Removing a Layer

Remove a layer using the remove (garbage can) button. You can always add the layer again later, however, any custom style settings (like the layer color) will be reset.

![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBcscLDgqkZyahunFkA%2F-LBcymXHiUm2IlvsNBSc%2Fimage.png?alt=media\&token=4b32b850-786a-4e7d-a5c6-fdb3fcc74d0e)

## Saving the Map

To save your map you must login or [sign up for an account](https://help.maphubs.com/getting-started/signup-for-a-maphubs-account) If needed, press the *Login* button. This will open the login page in a new tab so you don't lose progress on your map. After logging in, click the *Retry* button. If you are logged in the save section will update to show the map title form and the Save button.

{% hint style="warning" %}
Some MapHubs sites require permission from the site owner to login and save maps.&#x20;
{% endhint %}

Enter a short descriptive title for the map, this will show at the top of the map legend. To provide a more detailed description of the map, we recommend embedding the map in a Story/Report.

It is possibly to enter a map title in multiple languages, the correct title will display automatically based on the users language settings in their computer/browser.

![Saving a map](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LBd4AtKioUluUwl-UnS%2F-LBd4rtYx0RNMbzTgyS3%2Fimage.png?alt=media\&token=c33cfc24-2916-492f-9f30-884e044e97d9)

If you are a member of one or more groups, you will be offered to save the map to a group. This is the recommended approach for group work since it allows your group members to collaborate and make changes to the map.

Finally click *Save Map,* it will automatically take to your new map.

{% hint style="info" %}
To edit the map again, use the *Edit Map* button in the menu on the map page.
{% endhint %}

## What's Next?

{% hint style="success" %}
That's it! Now you have a map that you can share.
{% endhint %}

Be sure to check out our other tutorials to learn how to share your map or embed it in your website.

{% content-ref url="/pages/-L97P9mpOSlV6HCSqGbP" %}
[Export a Map as an Image](https://help.maphubs.com/maps/export-a-map-as-an-image)
{% endcontent-ref %}

## Need Help?

We'll help you make your first map! Just send us a message at <support@maphubs.com>


# Sharing Maps

### Sharing a Link

{% hint style="info" %}
If your MapHubs site is public facing (no login required) then you can simply share the link to the map in the address bar of your browser.
{% endhint %}

On a private MapHubs portal you can create a share link to a map. Anyone with the link will be able to view the interactive map.

Start by going to the map. From the menu choose the share option

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDNKc0S2LmZ-mFGsUa%2Fimage.png?alt=media\&token=f21fd608-efe4-45ee-9269-71372518cdce)

Click the toggle button to enable sharing

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDNYpq-PpFggdS_J0H%2Fimage.png?alt=media\&token=51366143-2f1b-4cc8-9c0d-258870e6910b)

Agree to share the map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDNgLXMK-S4mbNNOul%2Fimage.png?alt=media\&token=0c855857-57b7-4675-909c-53801b0c7567)

Now you can copy the link to share

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDNqcZneYWUTDul49I%2Fimage.png?alt=media\&token=35860808-a3ce-4959-afa3-aea5a8beecfe)

{% hint style="danger" %}
Use caution when sharing sensitive data. Sharing a map public exposes all the data in the map including data attributes via map popups etc. to anyone with the link.&#x20;
{% endhint %}

### Facebook or Twitter

{% hint style="info" %}
Public sites only, to share from a private site [create a share link](https://help.maphubs.com/maps/sharing-maps#sharing-a-link)
{% endhint %}

Facebook and Twitter share icons are provided in the bottom left corner of the map. Click the icon to open the share interface.&#x20;

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDOSIPsrDUa_FEqTAM%2Fimage.png?alt=media\&token=9da65f4b-a179-4a73-8453-4a90647c17ab)

<br>

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDKzvFhPPU9-YCGvEE%2F-LIDObbsLgN4nur9kad3%2Fimage.png?alt=media\&token=0096ed1d-888d-418d-9ea0-455bcf3387c3)

### Save an Image

You can also [save an image of a map or take a screenshot](https://help.maphubs.com/maps/export-a-map-as-an-image)

### Embedding Maps on your Website or Blog


# Export a Map as an Image

In MapHubs you can export any map as a PNG image for inclusion in documents, presentation slides, etc.

## Step 1: Create or Find a Map

To create a map see our tutorial on [How to Make a Map](http://help.maphubs.com/article/6-how-to-make-a-map)

To find a map, from [http://maphubs.com](http://maphubs.com/)click Explore, then scroll to the maps section. Click "More Maps" if you want to see more popular maps or search all maps. Click on a map card to open the map.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAjEGAs8rSWBakcV%2Fmaps.jpg?generation=1522706989711636\&alt=media)

## Step 2: Export PNG Image

From the menu in the bottom right of the map page, select "Get Map as PNG Image" (photo icon). It may take a view seconds to generate the map image.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAjKqONfHuVL1-nN%2Fmap-as-png.jpg?generation=1522707003755579\&alt=media)

Note: currently the map image will only be the default location/zoom chosen by the map's designer. If you have moved or zoomed the map on the page that will not be reflected in the export. We plan to improve that in the future, but for now if you need a different map you can always make your own version using the same layers. See our tutorial on [How to Make a Map](http://help.maphubs.com/article/6-how-to-make-a-map)

## Step 3: Attribution

If you are publishing this map, please be sure to research the source and licensing for the data layers and attribute them accordingly. MapHubs brings together data from a wide array of organizations and sources. These sources may have different requirements for how their data is licensed and used. For example, some datasets are for non-commercial use only and you may need to contact the data owner to if you need to use the data commercially.

You can use the layer links in the map legend to access the page for each layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAjZY4d_qd4Jio3h%2Fmap-attribution.jpg?generation=1522707003813563\&alt=media)


# Change the Layer Color

## Changing the color in the map maker

Open the style options for the layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAHH1d4alZjPH3Uu%2Fstyle-icon.png?generation=1522706995874332\&alt=media)

Select one of the preset colors or use the advanced color tab to pick your own.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAHOM36LIZAyGr9e%2Fcolor-options.png?generation=1522706998132727\&alt=media)

Close the style options.

## Changing the color of a layer you own

Go to the layer page.

Select ***Manage Layer*** from the menu in the bottom right.

Select the ***Style*** tab.

Select one of the preset colors or use the advanced color tab to pick your own.

Click ***Save*** to save your changes


# Copying Maps

Save a copy of a MapHubs Map

{% hint style="info" %}
Before copying a map you first need to have a [MapHubs account ](https://help.maphubs.com/getting-started/signup-for-a-maphubs-account)
{% endhint %}

View a map by clicking on the card for the map in MapHubs

![Example MapHubs Maps](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYC6Ze0hyzMNzPzmLS%2F-LPYDBBFTF67cRiXc4Hy%2Fimage.png?alt=media\&token=983771b5-5aa9-4f6d-a1c5-9c4aa06d1f26)

From the menu in the bottom right choose the copy map option

![Copy Map Icon](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYC6Ze0hyzMNzPzmLS%2F-LPYDqcNKCx4_6COlswR%2Fimage.png?alt=media\&token=70daa34b-43f0-407e-b041-be79ad2e818c)

Enter a name for the copied map and choose to save it under your user or into a group.

&#x20;<br>

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYC6Ze0hyzMNzPzmLS%2F-LPYEJAcKpXeo6Tt-pFQ%2Fimage.png?alt=media\&token=da86a3e2-a6cc-4efe-9159-8607e82389de)

Click Save Map, the map editor will open and you can edit the map, see [Make a Map](https://help.maphubs.com/maps/make-a-map) for more info on using the Map Maker to edit maps.


# Forest Report

MapHubs Forest Monitoring Analytics

{% hint style="info" %}
The Forest Report feature is an add-on feature that must be enabled on your MapHubs portal, please contact <support@maphubs.com> for more info
{% endhint %}

To access Forest Report, first click on a feature in a MapHubs map, then click *Open Feature Page*

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDPvFU7UUCcUl-W4YV%2Fimage.png?alt=media\&token=7c760605-09f8-4da3-99ec-58aca9acdf89)

On the feature page, click the *Forest Report* tab

{% hint style="info" %}
If you do not see the tab, check that you are logged in, and that your MapHubs portal has Forest Report enabled, or contact us at <support@maphubs.com>
{% endhint %}

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDQ8nc88Ny1vM8H9ld%2Fimage.png?alt=media\&token=275ec242-d798-43e1-a66f-0323d27c0fdb)

The report shows datasets include tree cover, tree cover loss, daily GLAD forest alerts, and Intact Forest Landscapes.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDQr8bOEjtWK5WBjhp%2Fimage.png?alt=media\&token=23c7977f-7e0d-401f-a745-44c846ac9a64)

Scroll down on the left to view additional data

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDROYdyHRq318YP0da%2Fimage.png?alt=media\&token=9951dbea-a330-4a9f-9fb7-ad81c3c4e45d)

Click the toggles to turn layers on/off in the map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDSIatMwrFQsgp4dl0%2Fimage.png?alt=media\&token=71e9fb41-577a-4266-a407-1205b8e4290d)

In the Forest Alert section clicking a day in the calendar site will filter the display to that detection date and update the map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDRlbyp0RNfjKq_XkH%2Fimage.png?alt=media\&token=79118c96-2ba3-4c8a-891a-65219ad472c3)

Download the GeoJSON file for the alerts, and then [upload it](https://help.maphubs.com/data/uploading-data) to a MapHubs Group to include it in a custom map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDS5iXh9H1i2N0W_a5%2Fimage.png?alt=media\&token=efdccebd-c5cb-465a-8d3f-5d62efa4bcb8)

Select additional base map options including satellite imagery from the map tools menu

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDOzBfW0x8TtlL00Wv%2F-LIDSc0YUiJM-cQW7ZHk%2Fimage.png?alt=media\&token=e8f13b2b-cc6a-4d77-948a-02607319d598)


# Uploading Data

## Overview

{% hint style="info" %}
In addition to uploading data, **MapHubs also supports linking to external data sources such as ArcGIS Online, Mapbox, or raster tile services**. It you already have your data online and are not interested in using MapHubs data editing tools, then it may be easier to just link to your existing data.
{% endhint %}

## Requirements

* Vector Data - MapHubs only supports uploading vector data (points/lines/polygons), other formats can be linked as map tiles
* Supported File Types - Shapefile, GeoJSON, KML, GPX, CSV (with proper formatting), Geobuf, and MapHubs format
* File Size: MapHubs supports data uploads up to around 50MB in size (zipped Shapefile). The exact requirements depends on the complexity of the data. Large vector data can be optimized to reduce complexity, split into regional datasets, or converted to vector tiles and linked into MapHubs

If you run into problems or need help uploading, please send us a message at <support@maphubs.com>

## Before you Start

Before you can upload a layer you must first:

1. login or [sign up for an account](https://help.maphubs.com/getting-started/signup-for-a-maphubs-account)
2. create a group, or be invited to your organization's group (contact the owner and tell them your MapHubs username)

## Step 1 - Create a New Layer

1. Click the *Explore* menu, then *Layers*&#x20;
2. Click the red (+) button to add a new layer
3. Choose the how you would like to create your layer

#### Upload a File

Choose the file to upload.

![Create layer Step 1 - Source Selection](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LB1W4D4baf7t0Azh4m6%2F-LB1W7Evjd8oSObGbIm2%2Fimage.png?alt=media\&token=a6cdc1ec-a076-4b6c-90e7-daa2d20a487a)

### Upload the File

Click Browse or drag and drop the file into the upload box

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LB1W4D4baf7t0Azh4m6%2F-LB1f5RmVDz_uUbV4sxh%2Fimage.png?alt=media\&token=1ee4a032-36ae-4b18-bd7c-12fc3a7c3310)

After the file uploads a preview map of the data will show&#x20;

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LB1W4D4baf7t0Azh4m6%2F-LB1fRo72YnXmW0QMgqk%2Fimage.png?alt=media\&token=bf24ac3e-2351-40db-ba3c-f37100cf78b2)

### Supported Types

**Shapefile**

Shapefiles must be zipped into a single .zip file (a Shapefile is actually a set of at least 6 files) If multiple shapefiles are found in the zip, you will be prompted to select one.

**GeoJSON**

MapHubs supports all GeoJSON files.

**KML**

Note: MapHubs does not yet support KMZ files, which are just zip files of one or moreKML files. You can usually rename a .kmz file to .zip, extract the zip, and then select the desired KML file contained within.

**GPX**

GPX files are normally provided by handheld GPS devices or GPS logging devices. MapHubs can import tracks or waypoints from GPX data.

**CSV**

CSV files need to be properly formatted to be recognized by MapHubs.

* They must have lat, lon columns (or some known variation of Latitude and Longitude)
* there can only be one set of lat, lon columns
* every row must have valid lat, lon values
  * Must be WGS84 (GPS) coordinates, using U.S. number formatting (. for decimal)
* The first row must be the column names
* Column names cannot be empty

**Geobuf (beta)**

Geobuf is a highly compressed (small file size) format made from GeoJSON data. If you need to minimize upload bandwidth you can use open-source tools to convert your data into this format before uploading to MapHubs.

**MapHubs**

MapHubs files are specially wrapped geobuf files that include metadata from MapHubs about the layer in addition to the geospatial data. While the Upload tool supports this format, it will only load the geospatial data, see *Import a MapHubs Export File* below

#### Create a New Empty Point, Line, or Polygon Layer

You have the option of creating a new empty layer. You can then use the editing tools in the Map Maker to draw data into the layer, or for point layers, points can be created by uploading location-enabled photos (from smartphones or GPS-enabled cameras)

Note: Point layers can also be configured with a public data submission form, or offer a submission API, contact us for more info.

#### Import a MapHubs Layer Export File

Select MapHubs, then choose import

Select the group that will own this layers

Upload the MapHubs file

Click Go to Layer to view the layer

Note: you can also link to a remote layer from a public MapHubs site like <https://mapforenvironment.org>

#### Link to External Data

MapHubs can also link to a range of external sources.

## Step 3 - Set Layer Information

### Set Name and Description

Enter a short descriptive name. This name will display in the map legend and elsewhere so it is best to keep it as short as possible. The name is also used when users search for layers, so you may wish to indicate the location/scope of the data, and if it changes frequently, the date.

Use the description field to provide additional information. If more space is needed, each layer has a *Notes* section that you can access after saving the layer.

### Set Source and License

Set the source of the layer. This should be an abbreviated attribution. It will show in the legend whenever a layer is added to a map. You can include a longer description of the source in the layer description or in the layer notes after creating the layer.

Set the license of the layer. If the data is distributed under an open or public domain license please select the correct license here. If the licenses is unknown or isn't listed leave the setting as "Not Provided". We strongly encourage our users to investigate the license and select the correct license.

If the license is not listed or requires additional explanation, choose "Custom" and provide more information in the layer description.

### **Multilingual Support**

You can enter layer information in MapHubs in multiple languages. It will automatically switch the preferred language of a user based on their computer and web browser preferences, and can also be changed manually at the top of the page (if enabled)

To enter information in a language, click on the language code above the text box. If no other languages are provided, the English option will be used by default. The supported languages at this time are English, French, Spanish, and Italian. Additional languages can be configured, please contact us at <support@maphubs.com>

### Choose a Group

Finally, choose a group that will own this layer. Note: if you are only in one group it will be selected for you automatically.

Members of the group will be able to edit the layer information and layer data.

When you are finished entering the layer information, click next.

## Step 3 - Choose Map Preview and Style

The map on the left is the preview map. It is used to generate the preview image show to users when they view your layer. Please pan/zoom the map to best show the data. On the right you can change the color of your layer, and add text labels.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PCuIF4xY58NNdGeC%2Fuploading-data-5.png?generation=1522707007537722\&alt=media)

## Step 4 - Save

Finally click Save to save the map. The map will now be visible in the group and available to users to make maps. You will be automatically taken to the page for the layer.

To make changes to the layer information, map style, or to customize the data fields in the layer, go to the Manage Layer page (available in the menu from the layer's page)


# Attach Photos to Map Features

Each map feature (point, line, or polygon) in MapHubs can have a photo attachment. This tutorial will walk you through the steps to attach a photo to a feature.

## Before You Start

To attach a photo to a feature you must first

* Login or Sign Up
* Be a member of a group
* Have at least one layer in your group that you want to attach photos to

## Step 1 - Go to a Feature Page

A feature page is page on MapHubs just for a single map feature. You can access this page in two ways:

### Option 1

Go to the layer page, then select the Data tab. Click the checkbox next to the feature you want to attach a photo to. Then click the "View Selected Feature" button above the data table.

### Option 2

From any map containing the layer, click on the feature that you want to attach a photo to. Click the info ( i ) button at the bottom of the popup for the feature.

## Step 2 - Upload a Photo

Once you are at the feature page, click the Photo tab.

* If the feature already has a photo, it will be displayed here along with buttons to replace it or remove it.
* If the feature does not have a photo, there will be a button to add a photo.

Click the button to add (or replace) the photo, the photo selection tool will appear.

Choose the file (.jpeg or .png image file), then choose the photo crop/size. Photos have a fixed size/ratio so they will display consistently on the map.

When you are ready, save the photo. The page will reload and you will see your photo when you click on the feature, or from the Photo tab on the feature page.


# Creating Data

Create new data in MapHubs by drawing on top of the map

First we need to create a new layer, this is similar to uploading data, however we will choose to create an empty layer instead. In this example we will choose to make a point layer

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDUZo85Jzoif9lBTth%2Fimage.png?alt=media\&token=e240e734-d272-4c54-9deb-583aaec4b54b)

Give your layer a name and choose a default style and preview map location, and save your layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDVPk4pdsruxU8NlRu%2Fimage.png?alt=media\&token=3000cbab-138b-4b2f-a639-e269f23143ae)

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDVc5RQSrVY1HuVlsr%2Fimage.png?alt=media\&token=e4e82a00-8d57-4ee4-98ab-8ec57b6b2a49)

Next [Make a Map](https://help.maphubs.com/maps/make-a-map) and add the layer to the map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDVt8ydDftaMzo7lWh%2Fimage.png?alt=media\&token=a4a1c30f-bf4e-48dc-ba52-b81c6bf3f165)

Click the *edit* icon next to the layer's name

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDW0a-LLXfMxJvZ6A5%2Fimage.png?alt=media\&token=c56a6aca-80ab-41a6-a65b-0f43016c2821)

The drawing tools will now appear on the right side of the map. To draw a new point click the point icon, then click on a location on the map.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDWF1iMw4x5-5TilKs%2Fimage.png?alt=media\&token=a235325d-e268-4b15-bf22-024a80603ed7)

Edit the attributes for the new point

{% hint style="info" %}
The fields for the layer can be customized in the layer settings, by default Name, Description, and Source are provided, however you can create for more detailed survey form if needed. In addition to text boxes, these can include dropdown/multiple-choice and check boxes&#x20;
{% endhint %}

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDWOZkwE9qFtWsf6w0%2Fimage.png?alt=media\&token=4d41e5e4-0db4-4dca-98d1-18628244e31f)

Click the save button to save your edits

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDWyoticz8a8qtd9Me%2Fimage.png?alt=media\&token=56f77519-f36b-48f4-bc57-f89f46e64283)

Exit the editing interface when you are finished adding data

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LIDU1c68SiiBkQFAw6G%2F-LIDX0XpNH384wQXYtBl%2Fimage.png?alt=media\&token=0bfec14f-8b03-4eb4-b01e-3e94fb08f5ea)


# Layer Metadata

## Overview

MapHubs requires all layers to have:

* Name
* Description
* Source
* License

In additional to those each layer has a freeform Notes page for adding more detailed information.

## Viewing Layer Metadata

Go to the page for the layer by clicking on the card for the layer (in Explore, Search, or Layers pages) or by clicking on the layer link in a map legend.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBSkuDFVUbERJBaW%2FPasted_Image_1_25_18__4_17_PM.png?generation=1522707004425808\&alt=media)

Use the Info and Notes tabs to view information about the layers.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBSpNYhC2m_SAlch%2FPasted_Image_1_25_18__4_19_PM.png?generation=1522707004473723\&alt=media)

## Editing Layer Metadata

This assumes you have already created a layer, for help creating a layer see [Uploading Data into MapHubs](https://help.maphubs.com/data/uploading-data)

### Layer Management

The layer name, description, source, and license are changed in the layer management page.

From the layer page, choose "Manage Layer" from the menu.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBSxCcRsInn2vj0j%2FPasted_Image_1_25_18__4_20_PM.png?generation=1522707003783812\&alt=media)

#### Info/Settings

On the info/settings tab you can change the layer name and layer description.

**Layer Name**

The layer name should be a short descriptive title. It is limited to 100 characters. It is often useful to include the name of the area, if the dataset isn't global, and the date of collection if the data is only updated periodically.

**Layer Description**

The layer description can be any additional text that explains the contents of the data, source, methodology, etc. URL links included in the description texted will be automatically linked on the layer page. Just be sure to include the <http://at> the beginning of the link. Layer descriptions are limited to 1,000 characters.

#### Source/License

On the source/license tab you can change the layer source and layer license.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBTNWMxtDigB52bF%2Flayer-settings-source.png?generation=1522707004442661\&alt=media)

**Layer Source**

The layer source should be a abbreviated attribution of the data source. This is often the name of the organization or individuals that created or collected the data, the name of the satellite product, or the academic citation.

If the source is long and needs further clarification, we recommend adding more information to the layer description or layer notes.

**Layer License**

The layer license allows you to choose from a list of public-domain or open data licenses. If the license is unknown or unlisted, leave it set to "No License Provided".

We strongly encourage researching and setting the license for MapHubs layers. Without a license potential users may not be able to use the data or may accidentally violate the licenses terms.

We are researching support for custom licenses. For now we recommend adding text to the layer description and layer notes to explain custom licensing. If you have concerns regarding license please contact us at <support@maphubs.com>

### Layer Notes

The layer notes can be changed directly through the layer page. You must be logged in and have permissions to modify the layer.

* Go to the page for the layer by clicking on the card for the layer (in Explore, Search, or Layers pages) or by clicking on the layer link in a map legend.
* Click on the Notes tab
* Click the edit button (pencil icon) in the bottom right of the notes panel.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBU4lqBGySBdIHwQ%2Flayers-notes-1.png?generation=1522707005653874\&alt=media)

The notes panel is a freeform rich text editor. After typing text, highlight it with the mouse cursor to see formatting options. You can create section headings, add lists, bold or italicize the font, and insert links to other pages.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBUAcXAkXBaUVm3A%2Flayer-notes-2.jpg?generation=1522707005683985\&alt=media)


# Raster Tile Layers

How to create a MapHubs layer using a raster tile service

{% hint style="info" %}
A raster tile service is a web service that points to image tiles used in web maps, normally 256x256 pixel PNG or JPEG images stored in a Z/X/Y format. For example: <https://storage.googleapis.com/moabi-raster-tiles/LC81290522017025LGN00/{z}/{x}/{y}.png> is the link to a tiles for a Landsat 8 scene used in this layer in Map for Environment <https://mapforenvironment.org/layer/info/640/#10.22/11.853/99.5299>
{% endhint %}

{% hint style="warning" %}
Before you start you must have a [MapHubs account](https://help.maphubs.com/getting-started/signup-for-a-maphubs-account), and have a [group](https://help.maphubs.com/getting-started/groups) where you want to create the new layer
{% endhint %}

## Create a Layer

Create a new layer by going to the Explore -> Layers page and clicking the  + button in the bottom right. Alternative you can click the Add a Layer button from the page of a group, and some MapHubs portals will have a Create a Layer shortcut on the landing page.

Choose the *Raster Tiles* option

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LMxxmLsIcK4WSjXXBDl%2F-LMyCMhXHWqU2SNTNKxg%2Fimage.png?alt=media\&token=2fdd1715-c50e-4a69-b7e9-e2cf541c7bd7)

Enter the tile URL for the raster tile service, pay special attention to the template portion  of the URL which must have the `/{z}/{x}/{y}` coordinates.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LMxxmLsIcK4WSjXXBDl%2F-LMyD_QU1loJ6kTe07_d%2Fimage.png?alt=media\&token=b6d85e8d-1354-4532-8881-9afd7be76991)

{% hint style="info" %}
If you know the min and max zoom levels you can optionally configure them here. Setting the max zoom level (if known) will prevent a raster layer from disappearing in the map when you zoom in past its maximum
{% endhint %}

Next give the layer a name, description, source, and license. Choose the group where you want to save the layer.&#x20;

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LMxxmLsIcK4WSjXXBDl%2F-LMyEWqfRYjul8_4CE-s%2Fimage.png?alt=media\&token=1738a57a-f62b-4e21-a128-a560920a56fb)

Finally zoom the preview map to the location of the raster data and optionally choose an opacity value for the layer if you want it to be transparent

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LMxxmLsIcK4WSjXXBDl%2F-LMyEiLmhW_ARHRtyiQD%2Fimage.png?alt=media\&token=0d448b61-8953-4919-8a01-35660b183c4b)


# Custom Layer Legends

The legend for a layer can be customized to match your custom style, (or the style of your website).

Legends use standard HTML notation. [Quick Intro to HTML](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started)

Default Legend Code

Here is an example of the default legend for a point layer colored red:

```
div class="omh-legend">
 <div class="point" style="background-color: red">
 </div>
 <h3>{NAME}</h3>
 </div>
```

## Graduated Circles Example #1

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PDVYXA9m-A79M0Od%2Fcustom-layer-legends-1.png?generation=1522707009162621\&alt=media)

In this example we are using the grid design from [http://materializecss.com/grid.html ](http://materializecss.com/grid.html)which is the UI design library used by MapHubs and is automatically available.

```
<div class="omh-legend">
 <h3>{NAME}</h3>
 <style scoped>
     .icon-col {
        width: 24px !important; 
        height: 100%;
     }
 </style>
  <div class="row no-margin" style="height: 14px;">
    <div class="col icon-col s2 no-padding valign-wrapper">
         <div class="col s4 no-padding circle valign" 
            style="background-color: red; width:4px; height: 4px">
       </div>
      <div class="col s4 no-padding circle valign" 
            style="background-color: red; width:8px; height: 8px">
       </div>
        <div class="col s4 no-padding circle valign" 
            style="background-color: red; width:12px; height: 12px">
       </div>

    </div>
     <div class="col s10 valign-wrapper" style="padding 10 0;">
      <span class="valign" style="font-size: 8px;">Puissance installée (MW)</span>
    </div>
  </div>
  <div class="row no-margin" style="height: 14px;">
    <div class="col icon-col s2 no-padding valign-wrapper">
       <div class="circle valign"
            style="background-color: pink; width:8px; height: 8px">
       </div>
    </div>
   <div class="col s10 valign-wrapper" style="padding 10 0; height: 100%;"> 
    <span class="valign" style="font-size: 8px;">Projet</span>
  </div>
  </div>
  <div class="row no-margin" style="height: 14px;">
    <div class="col icon-col s2 no-padding valign-wrapper">
       <div class="circle valign"
            style="background-color: grey; width:8px; height: 8px">
       </div>
   </div>
   <div class="col s10 valign-wrapper" style="padding 10 0; height: 100%;"> 
    <span class="valign" style="font-size: 8px;">Inconnu</span>
  </div>
  </div>
 </div>
```

## Graduated Circles Example #2

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PDXjJIzmU708IzmM%2Fcustom-layer-legends-2.png?generation=1522707008470032\&alt=media)

```
<div class="omh-legend">
    <style scoped>
    .legend-row {
         display: flex; 
         position: relative; 
         align-items: center; 
         justify-content: space-between; 
         padding-top: 3px;
     }
    .legend-item-wrapper {
         position: relative; 
         flex-basis: 100%; 
         height: 100%;
     }
     .point {
        float: left;
        margin-right: 5px;
        border-radius: 50%;
        border: 1px solid #888;
        position: absolute;
        bottom: 0;
     }
     .legend-label {
         float: left; 
         font-size: 8px;
     }
 </style>
 <h3>{NAME}</h3>

<div class="legend-row">
  <div class="legend-item-wrapper">
    <span class="legend-label">0</span>
  </div>
  <div class="legend-item-wrapper">
    <span class="legend-label">10</span>
  </div>
  <div class="legend-item-wrapper">
    <span class="legend-label">500</span>
  </div>
  <div class="legend-item-wrapper">
    <span class="legend-label">1k</span>
  </div>
  <div class="legend-item-wrapper">
    <span class="legend-label">10k</span>
  </div>
  <div class="legend-item-wrapper">
    <div class="legend-label">100k</div>
  </div>
</div>
<div class="legend-row" style="height: 28px;">
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #ffffd4; width: 8px; height: 8px;"></div>
  </div>
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #fee391; width: 12px; height: 12px;"></div>
  </div>
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #fec44f; width: 16px; height: 16px;"></div>
  </div>
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #fe9929; width: 20px; height: 20px;"></div>
  </div>
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #d95f0e; width: 24px; height: 24px;"></div>
  </div>
  <div class="legend-item-wrapper">
    <div class="point" style="background-color: #993404; width: 28px; height: 28px;"></div>
  </div>
</div>
</div>
```


# Data-Driven Map Styles

Data-driven map styles allow you to visualize your data by varying the color or size. This may be categorical, based on type (apple=red, orange=orange, banana=yellow), by a numeric range (1-10=red, 11-20=blue) or exponential (from 1 to 100 show a continuous gradient of colors from red to blue)

**Display Functions**

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBTITqtBlcqpYGkx%2Fmata-driven-map-styles-1?generation=1522707006862611\&alt=media)

*From:*&#x20;

[*https://www.mapbox.com/help/how-map-design-works/#data-driven-styles*](https://www.mapbox.com/help/how-map-design-works/#data-driven-styles)

These are normally used to make 3 general types of maps

1. Graduated circles - circles with varying size
2. Choropleth - polygons with varying colors
3. Line colors - varying line colors

In some cases, like with graduated circles, we an also apply varying colors of the circles in order to show two values at once.

## Configuring Numeric Fields in MapHubs

To display the map style based on a numeric value, you first need to configure the value as a number in MapHubs. Likely when the data was imported it was recorded as a plain text value. This is generally safer for most datasets, since many datasets are messy and may contain non-numeric characters in that field. If that is the case for your data, please edit the data and remove any non-numeric values from the field before proceeding.

1. Go to the page for the layer
2. From the menu in the bottom right, choose

   *Manage Layer*
3. ![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBTcsFoSFsOg3fPX%2Fdata-driven-map-styles-2?generation=1522707006841366\&alt=media)

   *Go to the*

   *Fields*

   tab

   ![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBU4_rURPAeza3b7%2Fdata-driven-map-styles-3.png?generation=1522707007408324\&alt=media)
4. Locate the field, and change the type dropdown to

   *Number*

   ![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBUJCSIoh2N7NToN%2Fdata-driven-map-styles-5.png?generation=1522707006218707\&alt=media)
5. Click

   *Save*

## Editing the Map Style

see [Editing Map Style Code](http://help.maphubs.com/article/23-editing-map-style-code-advanced)to learn how to access and edit the Mapbox GL style

## Graduated Circle Maps

A graduated circle map is one where locations on the map are displayed using varying circle sizes. To do this you need to decide how to classify your data.

**Disclaimer: it is important to consider the accuracy of your data classification. It is easy to mislead or misrepresent data while still making a nice looking map.**

One simple way to classify your data is with equal intervals. For example of your data ranges from 0 to 25, then you can create 5 class 0-5, 6-10, 11-20, 21-25 and assign each range a circle size. In the style code, you will create stops for 0, 5, 10, 15, 20, 25 and assign each a size. Alternatively you can use the interval method and assign each range a size.

However equal intervals may not be the best way to display your data. To classify your data, you will need to explore your data and decide on your classification using an external GIS program. We recommend QGIS a free open-source GIS program. You can export your data from MapHubs to view it in QGIS. You can learn more about map classification here <http://axismaps.github.io/thematic-cartography/articles/classification.html>

Once you know how you want to classify your data, [Edit the Map Style Code](http://help.maphubs.com/article/23-editing-map-style-code-advanced)for the layer.

Scroll through the code and look for the section with an id that starts with "omh-data-point-" This is the mapbox-gl layer that draws the circles for the point data. By default, point data in MapHubs is draw as a uniform small circle.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBUyUKw051xKc5vi%2Fdata-driven-map-styles-6.png?generation=1522707006828353\&alt=media)

In the paint section we are going to add a "circle-radius" parameter and assign it a list of stops corresponding with the classifications in our data

```
"paint": {
        "circle-color": "#44bbf8",
        "circle-opacity": 0.8,
        "circle-blur": 0.2,
        "circle-radius": {
          "type": "exponential",
          "property": "my-value",
          "stops": [
            [
              0,
              1
            ],
            [
              10,
              6
            ],
            [
              50,
              12
            ],
            [
              100,
              16
            ],
            [
              250,
              20
            ],
            [
              500,
              25
            ]
          ]
        },
        "circle-stroke-width": 0.5,
        "circle-stroke-color": "#44bbf8"
      }
    },
```

## Choropleth Maps

A choropleth map is one where the polygons features are have different colors based on an attribute value. If you wan to display a type/categorical value, this is is easy, just choose a color for each type (apple=red, orange=orange, banana=yellow). However, you have numeric data (population, crime rates, etc.) then you need to decide how to classify your data.

**Disclaimer: it is important to consider the accuracy of your data classification. It is easy to mislead or misrepresent data while still making a nice looking map.**

One simple way to classify your data is with equal intervals. For example of your data ranges from 0 to 25, then you can create 5 class 0-5, 6-10, 11-20, 21-25 and assign each range a color. In the style code below which is using the exponential method, you would create stops for 0, 5, 10, 15, 20, 25 and assign each a color. Alternatively you can use the interval method and assign each range a color.

However equal intervals may not be the best way to display your data. To classify your data, you will need to explore your data and decide on your classification using an external GIS program. We recommend QGIS a free open-source GIS program. You can export your data from MapHubs to view it in QGIS. You can learn more about map classification here <http://axismaps.github.io/thematic-cartography/articles/classification.html>

Once you know how you want to classify your data, [Edit the Map Style Code](http://help.maphubs.com/article/23-editing-map-style-code-advanced)for the layer.

Scroll through the code and look for the section with an id that starts with "omh-data-polygon-"

Inside that section look for "paint" and then "fill-color", you want to replace the "fill-color" value with an array of values, called "stops" where each stop introduces a new color.

The colors use [HTML CSS Hex colors](http://www.w3schools.com/colors/colors_picker.asp)

Code for single color polygons:

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBX_zlClkBHqZvKK%2Fdata-driven-map-styles-7.png?generation=1522707006210884\&alt=media)

Example code for multiple colors:

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PBXema4PhIlzi5EP%2Fdata-driven-map-styles-8.png?generation=1522707007487707\&alt=media)

In this example, the data has an attribute field called population, replace it with the name of your attribute. Note: it is likely case-sensitive.

After editing the style, double check the syntax. Every string must be surrounded in quotes, each item in an array must be separated with a comma. When done click "Save" on the style editor, then "Save" again on the layer style page. If all goes well, your map should update with a new style.

Official documentation on data-driven styling support in the Mapbox GL Style Spec is here: <https://www.mapbox.com/mapbox-gl-style-spec/#types-function>

### Additional Examples

<https://www.mapbox.com/mapbox-gl-js/example/data-driven-circle-colors/>


# Editing Map Style Code (Advanced)

MapHubs maps are using the open-source Mapbox GL mapping technology. Behind the scenes these maps use data coding called Style GL, to describe the map. In MapHubs it is possible to edit this code directly to:

* Customize the Layer style beyond the MapHubs defaults
* Create data-driven styling for a MapHubs layer (see the data-driven styling tutorial)

**Editing style code for a layer**

To edit the layer you need to be a member of the group that owns it.

1. Go to the page for the layer, from the menu in the bottom-right choose the \_Manage Layer \_option

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAJYplFv9-9tYMao%2Fmanage-layer-menu.png?generation=1522706989608906\&alt=media)

1. Once on the layer manage page, go to the\_Style/Display \_tab.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAJntrtj5iSkYE9C%2Fstyle-display-tab.png?generation=1522707003216112\&alt=media)

1. Open the \_Advanced \_section on the right side of the page.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAJwtZSzRifZnIyp%2Fstyle-advanced.png?generation=1522707003262367\&alt=media)

1. Click *Edit Style Code*

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAKA0mACEKOc1fX1%2Fedit-style-code.png?generation=1522706994369810\&alt=media)

1. Edit the code, the editor will warn you if you have syntax/formatting errors.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAKLxT0T8JOx0Fto%2Fstyle-code.png?generation=1522706997607812\&alt=media)

1. Click \_Save \_to save your style code changes, the preview map will update to show your changes
2. Click \_Save \_on the layer management page to save your changes in the layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAKXQ9DPoJXlZFDC%2Fsave-style.png?generation=1522706998685081\&alt=media)

1. Click \_Back to Layer \_to go back to the layer page and view the larger map

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAKi2aAEwtgDvNs6%2Fback-to-layer.png?generation=1522707002660897\&alt=media)

**Editing style code for a map layer**

In MapHubs you can also customize a layer's style only inside a map. This may be useful, for example, to change the colors so that they better contrast with other layers in your map.

1. Enter the Map Maker either by clicking \_**Make a Map** \_or by editing an existing map.
2. Add the layer you want to edit to the map using ***Add Layer*** (if not already present)
3. Find the layer in the \_**Overlay Layers** \_panel on the left

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAM91AFhhLHShlrj%2Foverlay-layers.png?generation=1522707002689181\&alt=media)

1. Click the ***Change Style*** icon (color palette icon)

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAM_QA-n2hD1QL3L%2Fstyle-icon.png?generation=1522707002104929\&alt=media)

1. Open the \_**Advanced** \_section (you may need to scroll down)

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PAMwuHIhn7nbE1OQ%2Fadvanced-section.png?generation=1522707002736514\&alt=media)

1. Click ***Edit Style Code***

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-L97P9GxJKYj5gr2pfAM%2F-L97PANHoRY9_-P0ntwz%2Fedit-style-code.png?generation=1522707001667960\&alt=media)

1. Edit the code, the editor will warn you if you have syntax/formatting errors.
2. Click \_**Save** \_to save your style code changes, the map will update to show your changes


# Map Dropdown Menus

Configure a map with drop down menus

{% hint style="danger" %}
Advanced, requires some coding
{% endhint %}

Here is an example of map drop downs from [Congo Mines](< https://maps.congomines.org/#4.89/-9.03/25.62>) clicking on Mining Permits opens the menu and the user can choose to turn the layer on or off, or click to view more information about the layer.

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYejy_tBrSU5jjIfCM%2F-LPYfvOo57NhtnbSp94G%2Fimage.png?alt=media\&token=69d6ede6-8d0e-4712-8161-c092e983bcd3)

To configure map drop downs, edit the map and then open to the *Map Settings* section at bottom of left column, then click the *Advanced Settings* button

![Location of Map Settings section in the map maker](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYejy_tBrSU5jjIfCM%2F-LPYgyMOQN87_6LhUFTX%2Fimage.png?alt=media\&token=f34ada5d-4c4e-4cef-8205-a538240b2074)

![Click to open Advanced Settings code](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYejy_tBrSU5jjIfCM%2F-LPYhFqqQnLskf3J_om3%2Fimage.png?alt=media\&token=5f0f1d12-b6ab-4337-8707-fb9d9a72d199)

The Advanced Settings code editor will open

To add drop down menus to the map you will need to add a categories array to the JSON code and then add an object entry for each drown down (category) menu you want to add.&#x20;

Each menu has:

* a name, specified as language codes (English is required, you can add as many additional languages as you need)
* a list of layers specified using the layer ID. The layer ID can found in the URL for the a layer

To get started you can copy the following into the code editor:

```javascript
{
  "categories": [
    {
      "name": {
        "en": "My Dropdown"
      },
      "layers": [
      ]
    }
    ]
}
```

&#x20;Here is a full example for the map above:

```javascript
{
  "categories": [
    {
      "name": {
        "en": "Mines and infrastructure",
        "fr": "Mines et infrastructures"
      },
      "layers": [
        95,
        96,
        97,
        106
      ]
    },
    {
      "name": {
        "en": "Mining Permits",
        "fr": "Droits miniers"
      },
      "layers": [
        107,
        108
      ]
    },
    {
      "name": {
        "en": "Concessions",
        "fr": "Concessions"
      },
      "layers": [
        76,
        100
      ]
    },
    {
      "name": {
        "en": "ETDs",
        "fr": "ETDs"
      },
      "layers": [
        86,
        87,
        90,
        92
      ]
    }
  ]
}
```

![Finding the layer ID for a layer](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LPYejy_tBrSU5jjIfCM%2F-LPYiwxqgdQmxsVE1lST%2Fimage.png?alt=media\&token=e5d58ad7-82f9-406a-818a-ebfc46a476dc)

When you are done, click save on the *Advanced Settings* code editor, and then save your map.


# Earth Engine Layers

{% hint style="danger" %}
Your MapHubs portal must first be configured to support Earth Engine, contact <support@maphubs.com> to confirm
{% endhint %}

{% hint style="warning" %}
You will need a Google Account with access to Google Earth Engine to create and view maps with Earth Engine layers in MapHubs, you can find information and request an account at <https://earthengine.google.com/>&#x20;

MapHubs is not affiliated with Google or Google Earth Engine. We use Google Earth Engine's  API to display information from your account in the web browser on your computer.
{% endhint %}

Start by [creating a new layer in MapHubs](https://help.maphubs.com/data/uploading-data#step-1-create-a-new-layer), then select the Earth Engine option

![Choose the Earth Engine option in MapHubs during layer creation](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-Lcm-8tyBlMYfDkuvvx8%2Fimage.png?alt=media\&token=41db7e2d-f45e-4e90-a617-13d8381568a5)

Find the image ID from Google Earth Engine, this can be an image from a catalog or from a saved asset in your account.&#x20;

{% hint style="warning" %}
Assets in your account map also need to be shared with team members inside Earth Engine, or stored within a shared project in Earth Engine
{% endhint %}

![Example Image ID from Earth Engine](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-Lcm-OrtCDiONtwzHDgf%2Fimage.png?alt=media\&token=6557f75c-6583-4e19-ab0e-0285c0ad988a)

Paste the image ID into the form on MapHubs.&#x20;

Optionally set the min and max zoom levels on the map. Restricting the minZoom, may be useful to prevent attempts to render global-scale maps that may be too taxing for Google Earth Engine. These settings are usually not needed

![Entering the Image ID into MapHubs](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-Lcm00XuTl8hs9hQLCr6%2Fimage.png?alt=media\&token=036796b3-8c44-4f66-9638-176001ce0939)

Enter the name, description and source information for the layer

![Enter the layer information ](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-Lcm0bndNUci2KYXuOkT%2Fimage.png?alt=media\&token=e575e49e-102d-4aaa-8e63-30f71dfa5e7a)

{% hint style="warning" %}
The first time you view a map with a Google Earth Engine layer it will request that you allow access to your Google account, specifically your Google Earth Engine data.
{% endhint %}

![Allow Google Account access](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-LclzZGX0jXrCKa0pNlE%2Fimage.png?alt=media\&token=f70badf6-690e-4429-8925-80f0a2cdd672)

![Confirm permission for MapHubs to access your Google Earth Engine Data](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-LclzgagNT1IAl2J_i-O%2Fimage.png?alt=media\&token=ce4044a1-9cf4-4d39-b229-8c54541a922b)

The layer will then display in the preview map. You may need to pan/zoom the map to the location of the imagery if it is not global.

{% hint style="info" %}
In this screen the color and label settings will have no effect since the data is coming from Earth Engine. You can change the legend design under the Advanced section.
{% endhint %}

Click complete to save your layer.

![Choosing a preview map location and saving your layer](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LclzHZHJc8EqZXKzd44%2F-Lclzuk7uUeBQcSMY1fd%2Fimage.png?alt=media\&token=60951620-1450-46fb-aa30-d1e4248312a1)


# Changing Polygon Fill Patterns

### Option 1: Changing the fill transparency

In the More Colors panel you can reduce the transparency of the fill using the slider or by changing the alpha (A) value

![](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LsK5RmNg534XV1Y3Epk%2F-LsK5yOH6IUY_WZZ-lwW%2Fimage.png?alt=media\&token=cc28a882-40d2-410c-9c91-7591eedbb919)

### Option 2: Only show the outline

In the *Advanced* panel of the layer style settings choose *Outline Only*

![Fill Outline Only Option](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LsIhSqzvhq9sOQ3QGCk%2F-LsIqYs_WPqzk2XwJnw8%2Fimage.png?alt=media\&token=598476ec-84d4-499f-adcd-104a68ec946e)

### Option 3: Using a Pattern Fill

![Pattern Fill Example Map](https://1877297257-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L97P61aNiSmDn1953mp%2F-LsIhSqzvhq9sOQ3QGCk%2F-LsJiCWrUpEOA05VnJmg%2Fimage.png?alt=media\&token=4a48d06b-f362-4643-8b49-b0f6bf787561)

{% hint style="warning" %}
This requires using the [Advanced Map Style Code](https://help.maphubs.com/advanced/editing-map-style-code-advanced) to edit the underlying Mapbox GL style.
{% endhint %}

Update the  fill layer to change the fill to a pattern instead of a solid color:

1\) to add the `maphubs:images` section to the `metadata` This defines a small image, in this case an SVG vector icon of a stripe pattern, that will be repeated to create the fill.

2\) to add the `pattern-fill` to the `paint` section with the name of the image you created above

```javascript
{
      "id": "polygon-stripes-example",
      "type": "fill",
      "metadata": {
        "maphubs:layer_id": 1,
        "maphubs:globalid": "abc123",
        "maphubs:interactive": true,
        "maphubs:showBehindBaseMapLabels": false,
        "maphubs:images": [
          {
            "name": "stripes",
            "width": 8,
            "height": 8,
            "svg": "<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><rect width='10' height='10' fill-opacity='0' /><path d='M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2' stroke='black' stroke-width='1'/></svg>"
          }
        ],
        "maphubs:outline-only": false
      },
      "source": "polygon-stripes-example",
      "source-layer": "data",
      "filter": [
        "in",
        "$type",
        "Polygon"
      ],
      "paint": {
        "fill-pattern": "stripes",
        "fill-opacity": 0.7
      }
    },
```

If you want to change the color or size of the stripes you can change the `stroke` or `stroke-width` in the `path` element of the SVG icon

#### &#x20;Updating the Legend

After you've set a stripe fill you'll want to update legend. Here is an example showing the stripe pattern from the example above.

```markup
<div class="omh-legend">
 <div class="block" style="background-image: url(&quot;data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMCcgaGVpZ2h0PScxMCc+PHJlY3Qgd2lkdGg9JzEwJyBoZWlnaHQ9JzEwJyBmaWxsLW9wYWNpdHk9JzAnIC8+PHBhdGggZD0nTS0xLDEgbDIsLTIgTTAsMTAgbDEwLC0xMCBNOSwxMSBsMiwtMicgc3Ryb2tlPSdibGFjaycgc3Ryb2tlLXdpZHRoPScxJy8+PC9zdmc+&quot;); background-repeat: repeat;" ></div>
 <h3>{NAME}</h3>
 </div>
```

If you change the SVG for the image you'll need to base64 encode the SVG and replace the encoded value after `image/svg+xml;base64,` in the legend html. Paste your SVG into a tool like <https://www.base64encode.org/> to get the encoded value.


