# Coding Landmarks displaying info

**URL:** https://discourse.processing.org/t/coding-landmarks-displaying-info/1256
**Category:** Coding Questions
**Created:** [June 25, 2018, 6:40pm UTC](https://discourse.processing.org/t/coding-landmarks-displaying-info/1256 "2018-06-25T18:40:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Radccoon](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@Radccoon](https://discourse.processing.org/u/Radccoon)
#### Post date: [June 25, 2018, 6:40pm UTC](https://discourse.processing.org/t/coding-landmarks-displaying-info/1256/1 "2018-06-25T18:40:50Z")

</div>

I’m trying to code some landmarks, (as shown in the image) but when you put the cursor on top of the landmark displays some info.

 ![map](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/cfea38d8a3af0f21f2db6cac1d5d8efb2c7c9917.jpeg)

So far I manage to create this. But I just can’t figure out how to do what I want. Can someone help me please?

```auto
String[] place;

int radioIni = 50, radioFin = 800;
int rounds = 16;
int year =12;

/*
int month= 
 JAN = ENE.getChild();
 FEB = ();
 MAR = ();
 APR = ();
 MAY = ();
 JUN = ();
 JUL = ();
 AGO = ();
 SEP = ();
 OCT = ();
 NOV = ();
 DEC = ();
 int days= 365;
 
 float knowledge = ellipse();
 float intension = triangle ();
 float publicity = rect ();
 */

Europa euro;

void setup() {
  //size(displayWidth, displayHeight);
  fullScreen();
  place = loadStrings ("DATA_TRACKING PUBLICITARIO.csv");
  //println (place.);
  euro = new Europa();
}

void draw() { // spirals

  background(255);
  translate(width/2, height/2); // track everything to center
  strokeWeight(10);
  stroke(0);
  point(0, 0);

  noFill();
  strokeWeight (2);

  beginShape();
  int ang = 360/year;
  int rad = int(((radioFin-radioIni)*PI / rounds)/year); //16=rounds, 12=months
  for (int i=-1; i<=194; i++) { //one year round (i<12 (months) in 16 years are 192
    curveVertex(cos(radians(ang*i))*(radioIni+rad*i), sin(radians(ang*i))*(radioIni+rad*i));
  }
  endShape();
  //}
  //void europa {

  //stroke(europa);
  strokeWeight (12);
  for (int i=0; i<=192; i++) { //one year round (i<12 (months) in 16 years are 192
    //int ang = 360/12;
    //int rad = int(((radioFin-radioIni)*PI / rounds)/year); //16=rounds, 12=months

    point(cos(radians(ang*i))*(radioIni+rad*i), sin(radians(ang*i))*(radioIni+rad*i));
  }

  //void mouseClicked() {

  //euro.draw(1, 200, 100);
  euro.draw(3, 2, 1);
  euro.draw(1, 2, 2);
  euro.draw(0, 0, 0);
  euro.draw(2, 0, 1);
  euro.draw(2, 0, 2);
  euro.draw(0, 0, 3);
}

```

```auto
class Europa {

  int month= 12;
  int year= 360;
  float random;
  float trip;
  float publi;
  color germany = color (255, 62, 255), 
    spain= color(0, 101, 255), 
    france = color(0, 146, 255), 
    italy = color(0, 182, 255), 
    uk = color(0, 219, 255), 
    europa = color(0, 0, 255);

  int category;

  int ang = 360/year;
  int rad = int(((radioFin-radioIni)*PI / rounds)/year); //16=rounds, 12=months
 
  Europa() {
    //category = cat;
  }

  void draw (int category, int month, int year) {
    strokeWeight(2);
    
    if (category == 3){
      fill(germany);  
    }
    if (category == 0) {
      //ellipse(px, py, 10, 10);
      fill(0, 0, 255);
      ellipse(cos(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12)), sin(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12)), 20, 20);
    } else if (category == 1) {
      float px = cos(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12));
      float py = sin(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12));

      triangle(px-20, py+40/py, px+px/py, py+20, px+20, py+40/py);
    } else {
      pushStyle();
      rectMode(CENTER);
      rect(cos(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12)), sin(radians(ang*(month+year*12)))*(radioIni+rad*(month+year*12)), 20, 20);
      popStyle();
    }
    
  }
}

```

---

<div class="post-metadata">

### Author: ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)
#### Post date: [June 26, 2018, 3:05am UTC](https://discourse.processing.org/t/coding-landmarks-displaying-info/1256/2 "2018-06-26T03:05:34Z")

</div>

Hi @Radccoon can you reproduce the same error with a sketch that has less code and does not depend on external files, such as the CSV file? And, what have you tried in your debugging process so far to narrow down your problem?

---

<div class="post-metadata">

### Author: ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)
#### Post date: [June 26, 2018, 3:14am UTC](https://discourse.processing.org/t/coding-landmarks-displaying-info/1256/3 "2018-06-26T03:14:49Z")

</div>

@Radccoon Also, ‘Draw’ is a reserved keyword. consider using something like ‘drawPont()’

---

<div class="post-metadata">

### Author: ![Radccoon](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@Radccoon](https://discourse.processing.org/u/Radccoon)
#### Post date: [June 26, 2018, 3:38am UTC](https://discourse.processing.org/t/coding-landmarks-displaying-info/1256/4 "2018-06-26T03:38:23Z")

</div>

I hadn’t thought that, thanks, I’m gonna try it.
