npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-cli-mapy-cz

v0.0.5

Published

The default blueprint for ember-cli addons.

Downloads

7

Readme

Ember-cli-mapy-cz

Ember Observer Score Build Status

An ember-cli add-on for easy integration with mapy.cz maps. Each object displayed on map is inserted via child component, so you can easily declare which marker and when to display on map using {{#if}} and {{#each}} on template level.

Installation

  • ember install ember-cli-mapy-cz

Configuration

You must define the size of the canvas in which the map is displayed in your application. Otherwise the map will have zero size. Simply add something similar to this to your styles:

.s-map {
  width: 640px;
  height: 480px;
}

Usage

Simple map

{{s-map latitude=37.7833 longitude=-122.4167 zoom=12}}

Map with markers

  • Create block version of s-map component. You can pass it style attribute for in-line styling
  • Inside s-map component create s-map-layer. Currently this has no great use. Mainly for future usage.
  • Inside s-map-layer component create as many s-map-marker components as you want. Just pass in latitude and longitude. Use decimal degrees format marker: {latitude: 40.446, longitude: 79.982}
{{#s-map latitude=latitude longitude=longitude zoom=zoom style="width: 100%" as |map|}}
  {{#s-map-layer map=map as |layer|}}
    {{#each points as |point|}}
      {{s-map-marker layer=layer latitude=marker.latitude longitude=marker.longitude}}
    {{/each}}
  {{/s-map-layer}}
{{/s-map}}

Map with markers and cards

  • Create s-map-card component and pass it s-map-marker reference.
  • If you use s-map-card as a block, this block will be used for body.
  • If you use s-map-card in non-block version, then body property will be used for body.
  • You can always use title property to set title of the card.
  • If no title is provided, the card won't have one.
{{#s-map latitude=latitude longitude=longitude zoom=zoom style="width: 100%" as |map|}}
  {{#s-map-layer map=map as |layer|}}
    {{#each points as |point|}}
      {{#s-map-marker layer=layer latitude=point.latitude longitude=point.longitude as |marker|}}
        {{#if point.cardBody}}
          {{#s-map-card marker=marker header=point.cardHeader}}
            This is block version for the body of the card. We can pass dynamic arguments here: {{point.cardBody}}
          {{/s-map-card}}
        {{else}}
          {{s-map-card marker=marker title="Empty card" body="This card has only static text."}}
        {{/if}}
      {{/s-map-marker}}
    {{/each}}
  {{/s-map-layer}}
{{/s-map}}

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://ember-cli.com/.

Thanks

  • Major ideas in this project comes from ember-g-map project.
  • Special shout out goes to Geret