Leahcim
Leahcim

Reputation: 41919

JavaScript Finding the x and y coordinates

I want to use the canvas api on a map designed in Adobe illustrator that is 600px by 600px. Let's say there's a pizza store on the map. How can I find the x and y coordinates of it? sure, I know I could do trial and error, but if there's going to be a lot of different points I want to connect, I need a faster and more accurate way to get the x and y coordinates. Is there a way?

Upvotes: 0

Views: 544

Answers (1)

Phrogz
Phrogz

Reputation: 303146

  1. Open the image in Photoshop (presumably you have this, if you have Illustrator).
  2. Open the Info palette; click on the "XY" region and pick "Pixels" from the popup menu.
  3. Move the mouse over the map item; record the X/Y coordinate at this location.
  4. Rinse/repeat.

Upvotes: 1

Related Questions