• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

Where can I find Google Maps (blue) markers with numbers on it (from 1 to minus 250)?

We need Google Maps markers with numbers (1 to minus 250) on it (see example below): blue and free if possible.

If it's not possible to find it on the web? Otherwise, how can we automate the generation of those files with GIMP? With squeme? If so how?

Google Maps Blue Marker with number
0
Erwin Pombett
Asked:
Erwin Pombett
  • 2
  • 2
  • 2
1 Solution
 
Ray PaseurCommented:
You can generate your own markers within certain limits, or try asking Google for a marker with a character on it, but I am not sure if they can put three-digit negative numbers on the markers.

Can you please post an example with -249 -- I would like to see what you are looking for and how the numbers it might fit on the markers.  This is my smallest version of -249 (8-point type arial narrow) and it seems illegible.
blue01.png
0
 
BillDLCommented:
The only way you're going to get -xxx legible in a marker that size is to widen it.  Here's the same image kept the same height and widened to 38 pixels.  Is this something you could use?
 Times New Roman - Font Size 6
0
 
BillDLCommented:
I should really have thinned out the "point" and made the black image border uniform after widening the image, but that would be easily done.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Ray PaseurCommented:
Actually, you can create any kind of marker you want - up to 64x64 pixels, but there are strict limits on how many different markers can appear on the map.  There may also be limits imposed by other factors like URL length.  Have a look at this page, where one of the markers is the letter "L"
http://www.landonbaseball.com/site_visitors.php

That letter is made by this image.  A custom icon used on a Google Map
So if you can use something else besides the standard sort of markers, you may get to a good solution.  I have a mapping article here at EE that may be helpful.  It has links to the online Google man pages.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350-Using-the-Google-Maps-API-in-PHP.html 

HTH, ~Ray
0
 
Erwin PombettAuthor Commented:
hello experts,

thank you for your information Ray and Bill..

i neglected the question because i came accross a php script and i could generate my pictures with it....

i can not find the link but i'm copiing it to this post.


<?php
function hex_to_rgb($hex) {
    // remove '#'
    if(substr($hex,0,1) == '#')
        $hex = substr($hex,1) ;

    // expand short form ('fff') color to long form ('ffffff')
    if(strlen($hex) == 3) {
        $hex = substr($hex,0,1) . substr($hex,0,1) .
               substr($hex,1,1) . substr($hex,1,1) .
               substr($hex,2,1) . substr($hex,2,1) ;
    }

    if(strlen($hex) != 6) die('Error: Invalid color "'.$hex.'"') ;

    // convert from hexidecimal number systems
    $rgb['red'] = hexdec(substr($hex,0,2)) ;
    $rgb['green'] = hexdec(substr($hex,2,2)) ;
    $rgb['blue'] = hexdec(substr($hex,4,2)) ;

    return $rgb ;
}

///////Input Checking
$_GET['image'] = "marker.png";



$_GET['font_file'] = "marker.png";
$_GET['font_size'] = "10px";
$_GET['font_color'] = "#00ff00";
$_GET['image']       = "10px";
$_GET['x'] = "#00ff00";
$_GET['y'] = "#00ff00";
$_GET['halign'] = "#00ff00";
$_GET['valign'] = "#00ff00";
$_GET['kerning'] = "#00ff00";


// convert the font color to rgb from hex
$font_rgb = hex_to_rgb($font_color) ;


list($image_width, $image_height, $image_type) = getimagesize($_GET['image']);
if ($image_type != 3) die ('You must use a PNG image');

for ($i = 1; $i <= 99; $i++){
      $text = $i;

      $im = imagecreatefrompng($_GET['image']);
      imageAlphaBlending($im, true);
      imageSaveAlpha($im, true);

      $canvas = imagecreatetruecolor($image_width*4,$image_height*4);
      $trans_colour = imagecolorallocatealpha($canvas, 0, 0, 0, 127);
      imagefill($canvas, 0, 0, $trans_colour);

      imageAlphaBlending($canvas, true);
      imageSaveAlpha($canvas, true);

      $letters = str_split($text);
      $right = -1*$kerning_amount;      // start at 0 ($kerning_amount will be added below)

      $font_color = imagecolorallocate($canvas,$font_rgb['red'],$font_rgb['green'],$font_rgb['blue']);

      for($j=0; $j < count($letters); $j++)
      {
            $bbox = imagettftext( $canvas, $font_size*4, 0, $right+$kerning_amount, $image_height*3, $font_color, $font_file, "{$letters[$j]}" );
            if ($j == 0){
                  $left = $bbox[0];
                  $top = $bbox[0];
            }
            if ($bbox[1]>$bottom) $bottom = $bbox[1];
            if ($bbox[0]<$top) $top = $bbox[0];
            $right = $bbox[2];
      }
      $total_width = $hpos - $kerning_amount;

      $text_width_full = $right-$left;
      $text_height_full = $bottom-$top;
      $text_width = $text_width_full/4;
      $text_height = $text_height_full/4;
      if ($halign == 'left') $put_text_x = $x;
      else if ($halign == 'right') $put_text_x = $x - $text_width;
      else if ($halign == 'center') $put_text_x = $x - $text_width/2;
      if ($valign == 'top') $put_text_y = $y;
      else if ($valign == 'bottom') $put_text_y = $y - $text_height;
      else if ($valign == 'center') $put_text_y = $y - $text_height/2;

      imageCopyResampled( $im, $canvas, $put_text_x,$put_text_y, $left,$top, $text_width, $text_height, $text_width_full, $text_height_full);

      $filename = 'output/marker_'.$i.'.png';
      imagepng($im, $filename);
      imagedestroy($im);
      echo '<img src="'.$filename.'" /><br/>';
}
?>
0
 
Erwin PombettAuthor Commented:
i found the answer,
i set to good because i didn't give enough information concerning the source of the script and it's not mine.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now