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

Add Sketch Layer to Mobile Mapbook for FindMe Use #892

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions examples/mobile/mapbook.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,66 @@
<!--
The mapping services define the source of the mapping data.
-->

<map-source name="sketch" type="vector" title="Drawing and Markup">
<layer name="default" selectable="true" status="on">
<style><![CDATA[
{
"circle-radius": ["coalesce", ["get", "style:stroke-width"], 4],
"circle-color": ["coalesce", ["get", "style:fill-color"], "#fec44f"],
"circle-stroke-color": ["coalesce", ["get", "style:stroke-color"], "#d95f0e"],
"fill-color": ["coalesce", ["get", "style:fill-color"], "#fec44f"],
"fill-opacity": ["coalesce", ["get", "style:fill-opacity"], 0.6],
"line-color": ["coalesce", ["get", "style:stroke-color"], "#d95f0e"],
"line-opacity": ["coalesce", ["get", "style:stroke-opacity"], 0.8],
"line-width": ["coalesce", ["get", "style:stroke-width"], 4],
"text-field": "{label}",
"text-color": ["coalesce", ["get", "style:label-color"], "#333333"],
"text-size": ["coalesce", ["get", "style:label-size"], 16]
}
]]></style>

<legend type="html"><![CDATA[
The <b>Drawing and Markup</b> layer can be used to add user defined shapes
to the map.<br>
<div style='padding-top: 3px; padding-bottom: 5px;'>
<div style='vertical-align: middle; display: inline-block; width: 2em; height: 1em; background-color: #fec44f; border: solid 2px #d95f0e;'></div>
<b>Drawing</b>
</div>
]]></legend>

<template name="identify" auto="true" />
</layer>

<properties>
<property name="label" label="Sketch label" />

<property name="style:label-color"
label="Label color" type="color" default="#333333" />

<property name="style:label-size"
label="Label size" type="number" default="16" />

<property name="style:stroke-color"
label="Stroke color" type="color" default="#d95f0e" />

<property name="style:stroke-width"
label="Stroke size" type="range" min="0" max="10" default="4" />

<property name="style:stroke-opacity"
label="Stroke opacity" type="range"
min="0" max="1" step="0.1" default="0.8" />

<property name="style:fill-color"
label="Fill color" type="color" default="#d95f0e" />

<property name="style:fill-opacity"
label="Fill opacity" type="range"
min="0" max="1" step="0.1" default="0.8" />

</properties>
</map-source>

<map-source name="vector-parcels" type="mapserver-wfs">
<file>demo/parcels/parcels.map</file>
<param name="typename" value="ms:parcels"/>
Expand Down
Loading