Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][GD]Duża grafika (Mapa Świata)
Mike122
post
Post #1





Grupa: Zarejestrowani
Postów: 253
Pomógł: 1
Dołączył: 12.04.2006

Ostrzeżenie: (0%)
-----


Witam posiadam dużą grafikę (Mapa Świata) 1501x751. I Chciałbym na niej umieścić punkty więc używam
imagefilledrectangle" title="Zobacz w manualu PHP" target="_manual i na przykład Wrocław to imagefilledrectangle($im,769, 239, 780, 250, $kolor); a jak zrobić żeby nie musiał ręcznie znajdować punktu (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Bo np. będę chciał zaznaczyć coś w Chinach to trochę trudno wpisywać tak mniej więcej (strzelając). Jest jakiś sposób? A następnie później będę chciał połączyć te punkty używając ImageLine" title="Zobacz w manualu PHP" target="_manual. Proszę o pomoc jakieś porady lub coś (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Mike122
post
Post #2





Grupa: Zarejestrowani
Postów: 253
Pomógł: 1
Dołączył: 12.04.2006

Ostrzeżenie: (0%)
-----


Wyciągnąłem przydatne funkcje:] Czyli stopnie();
A próbowałem już rożnych metod z 360 i 180 (IMG:http://forum.php.pl/style_emoticons/default/dry.gif)
  1. <?php
  2. $x = stopnie("34^03'");
  3. $y = stopnie("118^13'");
  4. $x = floor(1501 * ($x - stopnie("0^"))/(stopnie("90^") - stopnie("0^")));
  5. $y = floor(751 * (- ($y - stopnie("0^"))/(stopnie("180^") - stopnie("0^"))));
  6. imagefilledrectangle($im,$x, $y, $x+40, $y+40, $kolor);
  7. ?>


czy

  1. <?php
  2. $x = stopnie("34^03'");
  3. $y = stopnie("118^13'");
  4. $x = floor(1501 * ($x - stopnie("90^"))/(stopnie("180^") - stopnie("90^")));
  5. $y = floor(751 * (- ($y - stopnie("180^"))/(stopnie("360^") - stopnie("180^"))));
  6. imagefilledrectangle($im,$x, $y, $x+40, $y+40, $kolor);
  7. ?>


czy

  1. <?php
  2. $x = stopnie("34^03'");
  3. $y = stopnie("118^13'");
  4. $x = floor(1501 * ($x - stopnie("90^"))/(stopnie("180^") - stopnie("90^")));
  5. $y = floor(751 * (- ($y - stopnie("180^"))/(stopnie("360^") - stopnie("180^"))));
  6. imagefilledrectangle($im,$x, $y, $x+40, $y+40, $kolor);
  7. ?>

Ale coś źle robię (IMG:http://forum.php.pl/style_emoticons/default/ohmy.gif)

Ten post edytował Mike122 11.07.2007, 16:18:15
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 02:44