SlideShare uma empresa Scribd logo
1 de 14
Desvendando o
NewMapComponent
Kleyson Rios
Pentaho Day Brasil
2017
 Breve introdução
 Principais features
 Exemplos
Agenda
 Engine de mapas
 Criar dashboards com informações georeferenciadas
 Markers e Shapes
 Bibliotecas Openlayers2 e GoogleMaps*
Introdução
* Requer uma API key
 Panning mode (pan)
 Zoom box mode (zoombox)
 Selection box mode* (selection)
Modos de operação (estados do mapa)
Panning mode
Selection mode
Zoom box mode
* Para ativar o Selection mode, basta setar a propriedade Parameter
 disabled
‒ Quando o mapa não está configurado
para Selection mode
 noneSelected
‒ Quando não existe nenhum item selecionado
 allSelected
‒ Quando todos os itens estão selecionados
 someSelected
‒ Quando pelo menos um conjunto de itens está
selecionado
 selected
‒ Quando o item é selecionado
 unselected
‒ Quando o item não está selecionado
 normal
‒ Quando o mouse não está sobre um item
 hover
‒ Quando o mouse está sobre um item
Estados das features
 Combinação dos vários estados
Tipo do Mapa vs Estado do Mapa vs Estado das Features
‒ Exemplo:
global/markers/shapes : pan/zoombox/selection : featureStates : Atributo
 Estilização baseado no conceito do CSS, onde ”paths” mais específicos tem prioridades
sobre os mais genéricos. Exemplo.
 Cadeia de precedência:
- global
- markers/shapes
- disabled/noneSelected/someSelected/allSelected
- pan/zoombox/selection
- unselected/selected
- normal/hover
- attribute
- calculated attributes based on the result set*
Estilizando o mapa
O estilo pode alterado via preExecution:
this.styleMap = {
markers: {
cursor: "pointer”
}
};
 Define o estilo visual do item
‒ Stroke, color, opacity, etc
 Em geral os atributos são padrão SVG.
‒ Openlayers2 atributos.
 Pode ser valor estático
‒ Definido no styleMap
 Pode ser dinâmico, baseado em regras de
negócio
Definindo os atributos dos itens
Atributos dinâmicos podem serem definidos via preExecution:
this.attributeMapping.fill = function(context, seriesRoot, mapping, row) {
var value = row[2];
if ( _.isNumber(value) && value < 25 ) {
return "green";
} else {
return "red";
}
};
 Baseado em um paleta de cores.
 Espera-se uma coluna numérica chamada fill no resultSet.
 Permite-se alterar a paleta de cores.
Escala automática de cores
Alterar paleta de cores via preExecution:
this.colormap = [
"[213,238,249]",
"[194,231,246]",
"[175,223,244]",
"[156,216,241]",
"[137,208,239]",
"[117,201,236]",
"[98,193,233]",
"[79,186,231]",
"[60,178,228]",
"[41,171,226]"
];
 Definição automática do raio (markers)
 Espera-se uma coluna numérica chamada r no resultSet.
 Tamanho do raio baseado em um range de valores.
Markers com tamanhos dinâmicos
Configurar Min e Max do raio via preExecution:
/*
* Set Min and Max size (pixel) for the markers based on the r values
*/
this.scales.r = [3, 10];
 Corretamente indexar os dados no resultset.
‒ id (valores únicos)
‒ fill (escala automática de cores)
‒ r (raio dinâmico)
‒ latitude
‒ longitude
 Mapear os dados acima para colunas de diferente nomes.
Colunas obrigatórias
Redefinir o mapeamento das colunas via preExecution:
this.visualRoles = {
id: 0,
fill: 1,
r: 2,
latitude: 3,
longitude: 4
};
ResultSet:
Cidade – IdadeMedia – RendaMedia – Lat – Lng
 Zoom automático
 Popup’s
 Markers com gráficos CGG
 Eventos
 Latitude/Longitude lookup
 Shapefile formats (geoJSON, kml, simpleJSON)
 AddIn’s (LocationResolver, ShapeResolver, MarkerImage)
 Manipular a API*
O que mais podemos fazer ?!?!?!
* Não suportado
 CDE Samples: Public / plugin-samples / CDE / Require Samples
/ CDE Reference / NewMapComponent
 Source code
 Comunidade
 NMC-Samples repository (kleysonr @ github)*
Fontes de aprendizado
* Pode haver exemplos com funcionalidades não suportadas
DEMO
Perguntas ?
Obrigado !
Twitter: @kleysonr
Github: https://github.com/kleysonr
Blog: http://kleysonrios.blogspot.com.br
Comunidade Pentahobr

Mais conteúdo relacionado

Último

Assessement Boas Praticas em Kubernetes.pdf
Assessement Boas Praticas em Kubernetes.pdfAssessement Boas Praticas em Kubernetes.pdf
Assessement Boas Praticas em Kubernetes.pdf
Natalia Granato
 

Último (6)

Padrões de Projeto: Proxy e Command com exemplo
Padrões de Projeto: Proxy e Command com exemploPadrões de Projeto: Proxy e Command com exemplo
Padrões de Projeto: Proxy e Command com exemplo
 
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docxATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
 
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docxATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
 
Boas práticas de programação com Object Calisthenics
Boas práticas de programação com Object CalisthenicsBoas práticas de programação com Object Calisthenics
Boas práticas de programação com Object Calisthenics
 
Assessement Boas Praticas em Kubernetes.pdf
Assessement Boas Praticas em Kubernetes.pdfAssessement Boas Praticas em Kubernetes.pdf
Assessement Boas Praticas em Kubernetes.pdf
 
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docxATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

CDE NewMapComponent

  • 2.  Breve introdução  Principais features  Exemplos Agenda
  • 3.  Engine de mapas  Criar dashboards com informações georeferenciadas  Markers e Shapes  Bibliotecas Openlayers2 e GoogleMaps* Introdução * Requer uma API key
  • 4.  Panning mode (pan)  Zoom box mode (zoombox)  Selection box mode* (selection) Modos de operação (estados do mapa) Panning mode Selection mode Zoom box mode * Para ativar o Selection mode, basta setar a propriedade Parameter
  • 5.  disabled ‒ Quando o mapa não está configurado para Selection mode  noneSelected ‒ Quando não existe nenhum item selecionado  allSelected ‒ Quando todos os itens estão selecionados  someSelected ‒ Quando pelo menos um conjunto de itens está selecionado  selected ‒ Quando o item é selecionado  unselected ‒ Quando o item não está selecionado  normal ‒ Quando o mouse não está sobre um item  hover ‒ Quando o mouse está sobre um item Estados das features
  • 6.  Combinação dos vários estados Tipo do Mapa vs Estado do Mapa vs Estado das Features ‒ Exemplo: global/markers/shapes : pan/zoombox/selection : featureStates : Atributo  Estilização baseado no conceito do CSS, onde ”paths” mais específicos tem prioridades sobre os mais genéricos. Exemplo.  Cadeia de precedência: - global - markers/shapes - disabled/noneSelected/someSelected/allSelected - pan/zoombox/selection - unselected/selected - normal/hover - attribute - calculated attributes based on the result set* Estilizando o mapa O estilo pode alterado via preExecution: this.styleMap = { markers: { cursor: "pointer” } };
  • 7.  Define o estilo visual do item ‒ Stroke, color, opacity, etc  Em geral os atributos são padrão SVG. ‒ Openlayers2 atributos.  Pode ser valor estático ‒ Definido no styleMap  Pode ser dinâmico, baseado em regras de negócio Definindo os atributos dos itens Atributos dinâmicos podem serem definidos via preExecution: this.attributeMapping.fill = function(context, seriesRoot, mapping, row) { var value = row[2]; if ( _.isNumber(value) && value < 25 ) { return "green"; } else { return "red"; } };
  • 8.  Baseado em um paleta de cores.  Espera-se uma coluna numérica chamada fill no resultSet.  Permite-se alterar a paleta de cores. Escala automática de cores Alterar paleta de cores via preExecution: this.colormap = [ "[213,238,249]", "[194,231,246]", "[175,223,244]", "[156,216,241]", "[137,208,239]", "[117,201,236]", "[98,193,233]", "[79,186,231]", "[60,178,228]", "[41,171,226]" ];
  • 9.  Definição automática do raio (markers)  Espera-se uma coluna numérica chamada r no resultSet.  Tamanho do raio baseado em um range de valores. Markers com tamanhos dinâmicos Configurar Min e Max do raio via preExecution: /* * Set Min and Max size (pixel) for the markers based on the r values */ this.scales.r = [3, 10];
  • 10.  Corretamente indexar os dados no resultset. ‒ id (valores únicos) ‒ fill (escala automática de cores) ‒ r (raio dinâmico) ‒ latitude ‒ longitude  Mapear os dados acima para colunas de diferente nomes. Colunas obrigatórias Redefinir o mapeamento das colunas via preExecution: this.visualRoles = { id: 0, fill: 1, r: 2, latitude: 3, longitude: 4 }; ResultSet: Cidade – IdadeMedia – RendaMedia – Lat – Lng
  • 11.  Zoom automático  Popup’s  Markers com gráficos CGG  Eventos  Latitude/Longitude lookup  Shapefile formats (geoJSON, kml, simpleJSON)  AddIn’s (LocationResolver, ShapeResolver, MarkerImage)  Manipular a API* O que mais podemos fazer ?!?!?! * Não suportado
  • 12.  CDE Samples: Public / plugin-samples / CDE / Require Samples / CDE Reference / NewMapComponent  Source code  Comunidade  NMC-Samples repository (kleysonr @ github)* Fontes de aprendizado * Pode haver exemplos com funcionalidades não suportadas
  • 13. DEMO
  • 14. Perguntas ? Obrigado ! Twitter: @kleysonr Github: https://github.com/kleysonr Blog: http://kleysonrios.blogspot.com.br Comunidade Pentahobr