Git Product home page Git Product logo

calcite-point-symbols's Introduction

calcite-point-symbols

A collection of SVG illustrations for map symbology.

Installation

npm install arcgis/calcite-point-symbols --save

Description

Provided symbols exist in one or more of the following three sizes:

  • 13x13
  • 17x17
  • 21x21

Why 3 Sizes?

More info on what happens when you scale vector based icons here

Why Odd Sizes?

Constructing these symbols on an odd-numbered pixel grid means that they can be centered both horizontally and vertically.

Point Symbol Help Documentation

https://support.esri.com/en/technical-article/000019909
https://www.esri.com/about/newsroom/arcwatch/create-2d-symbols-and-publish-them-to-arcgis-online/
https://pro.arcgis.com/en/pro-app/latest/help/data/indoors/create-or-modify-symbol-images.htm
https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/find-symbols.htm

JavaScript Exports

Icons are made available as named ES6 exports. This way you can import just the icons you need into your app:

import { campground21 } from "calcite-point-symbols";

console.log(campground21); // => "M12.402 16.976H19L10.503 2.998 2 16.976h6.626l1.888-8.94z"

The icon names will be lower camel case. If the icon name starts with a number, prefix the name with i. This is due to the fact that JavaScript variables cannot begin with a number.

If your build system does not perform tree shaking and dead code removal, there is a chance that importing the icons using this syntax will make your bundle extremely large. If that is the case, you can also import icons directly:

import { campground21 } from "@esri/calcite-ui-icons/js/campground21.js";

Some icons use multiple paths and opacity in their construction, for these the data structure will be an array of path data as follows:

[
  { d: "M16 6vh...", opacity: ".1" },
  ...
]

Note: It is not recommended to import the entire library of icons. This will have negative performance implications. Use the technique above to select only the icons your users actually need to download.

TypeScript

Types are also available for projects leveraging TypeScript. CalciteIconPath describes all exported icons (both single and multi-path) while CalciteMultiPathEntry describes an individual path from a multi-path icon.

JSON Format

All icons are also provided as part of a JSON file. If you installed via npm, you can import the full icon data set using the following:

var calciteIcons = require('calcite-point-symbols/docs/icons.json');

This will give you an object containing all the icons in the library at all sizes:

{
  version: '{current version number}',
  icons: {
    "a": {
      alias: [],
      category: '',
      21:['M23.756...']
    },
    ...
  }
}

Note: path data omitted for brevity.

Most icons will have simple strings as path data, but some will be more complex as they need to store not only path, but opacity as well for multiple shapes. Icons of this structure will be annotated with the multiPath flag.

Individual Icons Structure

All the individual SVG icons have a common file structure.

This is what the shoplifting-21.svg looks like:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21">
  <path d="M15 10V7.5A2.5 2.5 0 0 0 12.5 5c-.106 0-.208.018-.31.031l.368.975c.8.031 1.442.687 1.442 1.494V10H9.575s.482.835.555 1H11v1h-.648c-.017.435-.204.802-.567 1.049-.441.3-.845.444-1.234.444a1.46 1.46 0 0 1-.551-.11V18h9v-8h-2zm0 2h-1v-1h1v1zm-6-1s.611.958.222 1.222c-.853.579-1.055.111-1.41-.284-.798-.893-1.86-2.247-2.302-2.818a.99.99 0 0 1-.208-.61V6.827L4 5l3.75-2.5 1.125 1.75 2.01.952a1 1 0 0 1 .508.55L12.622 9h-2.368L8.981 7.294a.775.775 0 0 0-1.092-.005 1.204 1.204 0 0 0-.196 1.464L9 11z"/>
</svg>

None of the icons have stroke attributes. The fill attribute can be defined with css:

svg {
  fill: gray;
}

All the other styling properties applicable to the whole svg element are applicable.

svg:hover {
  fill: blue;
}

Licensing

COPYRIGHT © 2020 Esri

All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.

This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.

See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english

For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA

email: [email protected]

Contributing

Please read the contribute document.

calcite-point-symbols's People

Contributors

allieorth avatar grecordova avatar macandcheese avatar nicklu10 avatar paulcpederson avatar skyeseitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calcite-point-symbols's Issues

[Metadata] Fix discrepancies in category name casing, missing data

Checking in for my monthly nitpicky metadata issue:

There are a couple categories with inconsistent casing in the metadata: Planning and/And Development, and Health and/And Human Services:
Screen Shot 2022-01-29 at 11 55 05 AM

There are also a couple of icons with missing metadata including version, category, and alias:
Screen Shot 2022-01-29 at 11 56 34 AM

Allow multi-word icon names to be searchable

In Point Symbols, currently, you need to type in the dash for the search to populate multi-word icons. If you were searching for animal-safety for example, if you searched "animal safety" it wouldn't appear. Please allow it to treat dashes as if they were spaces in the search.

Symbol Origins

Hi

This symbol set is great.

Is it possible to also add to the repo a file with x,y placement origins for each symbol?

This could be as simple as a 0 -> 1 values in each axis from from the top left corner within the icon's bounding box, that way it would work for all sizes of each symbol. e.g. 0.5, 0.5 = center, 0.5,1 = bottom center.

If the file is a simple CSV in the format - <name>,<x-origin>,<y-origin> - then it would be easy to read in code. The name would not include the size. -

esri-pin-one,0.5,1
esri-pin-two,0.5,1
hexagon,0.5,0.5

Metadata Updates

Awesome additions to the set in 2.1.7! Noticed a couple things as I am previewing the changes in the Dev site icon search:

  • Small casing mismatch on the 'Planning And Development' category with the recent updates. I try not to "fix" the metadata by auto-capitalizing as it may not always be intended, so if possible, would be great to get these updated in the metadata:

Screen Shot 2023-05-08 at 10 08 20 AM

These should be "Disc" with a "c" :)

Screen Shot 2023-05-08 at 10 13 04 AM

Bicycle icons appear a bit distorted / squished (not sure if this intentional but wanted to share):
Screen Shot 2023-05-08 at 10 15 33 AM

cc @SkyeSeitz

Typo fix and category need for `theft-from-coin-operated-machine-or-device` icon

Issue mitigation

  1. The theft-from-coin-operated-machine-or-deviice icon has a mis-spelling (should be device).
  2. The icon's category is also depicted as uncategorized, but should be listed in "Law Enforcement" (crime classification)

Background

Received via email on 4/13 from a Calcite user:

Submitted on: Thu, 13 Apr 2023

Regarding Web page: https://developers.arcgis.com/calcite-design-system/icons/?icon=theft-from-coin-operated-machine-or-deviice&library=Point%20Symbols&version=2.1.6
Feedback: theft-from-coin-operated-machine-or-deviice icon is mis-spelled (should be device) and is in an uncategorized category when it should be in the Law Enforcement category (it is a crime classification)

Symbols for real-time visualization

Often I've found the available symbol options in ArcGIS products to be lacking for visualizing real-time data such as moving assets like vehicles, where the direction/heading of the feature is of interest.

I think including something akin to the compass or compass-north-circle from Calcite UI Icons would be a good basis.
image
image

It'd be incredible to have an aerial perspective of various vehicles available as point symbols in ArcGIS. The way moving vehicles are visualized in many rideshare apps is pleasing in my opinion, although I believe they use a set of static images that change based on the heading, however a silhouette version might still be useful.

These would be less useful when there are large clumps of points, but we often reach for Firefly symbols in those cases since the gradients help to blend them together.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.