How to use the gbdxtools.vector_styles.VectorStyle.get_style_value function in gbdxtools

To help you get started, we’ve selected a few gbdxtools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl heatmap paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'heatmap-radius': VectorStyle.get_style_value(self.radius),
            'heatmap-opacity': VectorStyle.get_style_value(self.opacity),
            'heatmap-color': VectorStyle.get_style_value(self.color),
            'heatmap-intensity': VectorStyle.get_style_value(self.intensity),
            'heatmap-weight': VectorStyle.get_style_value(self.weight)
        }

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl fill paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'fill-opacity': VectorStyle.get_style_value(self.opacity),
            'fill-color': VectorStyle.get_style_value(self.color),
            'fill-outline-color': VectorStyle.get_style_value(self.outline_color)
        }
        if self.translate:
            snippet['fill-translate'] = self.translate

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl heatmap paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'heatmap-radius': VectorStyle.get_style_value(self.radius),
            'heatmap-opacity': VectorStyle.get_style_value(self.opacity),
            'heatmap-color': VectorStyle.get_style_value(self.color),
            'heatmap-intensity': VectorStyle.get_style_value(self.intensity),
            'heatmap-weight': VectorStyle.get_style_value(self.weight)
        }

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl heatmap paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'heatmap-radius': VectorStyle.get_style_value(self.radius),
            'heatmap-opacity': VectorStyle.get_style_value(self.opacity),
            'heatmap-color': VectorStyle.get_style_value(self.color),
            'heatmap-intensity': VectorStyle.get_style_value(self.intensity),
            'heatmap-weight': VectorStyle.get_style_value(self.weight)
        }

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl fill paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'fill-opacity': VectorStyle.get_style_value(self.opacity),
            'fill-color': VectorStyle.get_style_value(self.color),
            'fill-outline-color': VectorStyle.get_style_value(self.outline_color)
        }
        if self.translate:
            snippet['fill-translate'] = self.translate

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl fill paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'fill-opacity': VectorStyle.get_style_value(self.opacity),
            'fill-color': VectorStyle.get_style_value(self.color),
            'fill-outline-color': VectorStyle.get_style_value(self.outline_color)
        }
        if self.translate:
            snippet['fill-translate'] = self.translate

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl line paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        # TODO Figure out why i cant use some of these props
        snippet = {
            'line-opacity': VectorStyle.get_style_value(self.opacity),
            'line-color': VectorStyle.get_style_value(self.color),
            #'line-cap': self.cap,
            #'line-join': self.join,
            'line-width': VectorStyle.get_style_value(self.width),
            #'line-gap-width': self.gap_width,
            #'line-blur': self.blur,
        }
        if self.translate:
            snippet['line-translate'] = self.translate

        if self.dasharray:
            snippet['line-dasharray'] = VectorStyle.get_style_value(self.dasharray)

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl fill-extrusion paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'fill-extrusion-opacity': VectorStyle.get_style_value(self.opacity),
            'fill-extrusion-color': VectorStyle.get_style_value(self.color),
            'fill-extrusion-base': VectorStyle.get_style_value(self.base),
            'fill-extrusion-height': VectorStyle.get_style_value(self.height)
        }
        if self.translate:
            snippet['fill-extrusion-translate'] = self.translate

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl fill-extrusion paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        snippet = {
            'fill-extrusion-opacity': VectorStyle.get_style_value(self.opacity),
            'fill-extrusion-color': VectorStyle.get_style_value(self.color),
            'fill-extrusion-base': VectorStyle.get_style_value(self.base),
            'fill-extrusion-height': VectorStyle.get_style_value(self.height)
        }
        if self.translate:
            snippet['fill-extrusion-translate'] = self.translate

        return snippet
github DigitalGlobe / gbdxtools / gbdxtools / vector_styles.py View on Github external
def paint(self):
        """
        Renders a javascript snippet suitable for use as a mapbox-gl line paint entry

        Returns:
            A dict that can be converted to a mapbox-gl javascript paint snippet
        """
        # TODO Figure out why i cant use some of these props
        snippet = {
            'line-opacity': VectorStyle.get_style_value(self.opacity),
            'line-color': VectorStyle.get_style_value(self.color),
            #'line-cap': self.cap,
            #'line-join': self.join,
            'line-width': VectorStyle.get_style_value(self.width),
            #'line-gap-width': self.gap_width,
            #'line-blur': self.blur,
        }
        if self.translate:
            snippet['line-translate'] = self.translate

        if self.dasharray:
            snippet['line-dasharray'] = VectorStyle.get_style_value(self.dasharray)

        return snippet