Banner

Handling large amounts of Data in the Google Map API

Wed May 20, 2009 10:50 am MST

MarkerClusterer - Optimal Method for Handling large amounts of Data in the Google Map API

This library, which is written by Xiaoxi Wu and is part of the Google Maps Open Source Utility Library is easy to use and shows excellent performance.

Like some of the other libraries it reduces the number of visible markers by clustering them together making it easier to get an overview. Watch the image below to see how.

Image by Xiaoxi Wu


It’s constructor takes three arguments, the first one being a reference to the map, the second one being an array of GMarkers and the third one being an object literal with options. Only the first one is required.

var markerCluster = new MarkerClusterer(map, markers, opts);

So to add a bunch of markers to the map having the default settings of the MarkerClusterer you do this:

view plaincopy to clipboardprint?

  1. var markers = [];  
  2. // Insert code to fill the markerArray with markers...  
  3. // Creating a new cluster by adding the map and the array of markers  
  4. var markerCluster = new MarkerClusterer(map, markers);  

See the documentation for a full explanation of the library and it’s capabilities. Also read MarkerClusterer: A Solution to the Too Many Markers Problem on the Google Geo Developer blog for more information.

Download markerclusterer.js

Free Stock Photo Sites

Tue May 19, 2009 3:42 pm MST

Whether you’re designing an artistic website or searching for images to post on your blog, sites that carry not only free but awesome stock photos may very well come in handy. Utilizing the correct set of photos for any project is key, especially if you’re designing an ad for a client, you should always put in your best effort as well as the best images you can find fit for the job.

Many of the designers I’ve come across like to download most of their images from 2-3 of the largest sites containing stock photos, however as creative artists I believe we should play the mix and match game that allows us to choose from wide variety of stock images instead of the same “old” set of photos we may be fond of.

Giving a project that requires stock images your best should include photos that are not only sharp, but clear as well. Here we’ll have the pleasure to visit a few awesome (25 to be exact) sites that’ll provide all the needed images to fuel any project, job, or site requiring stock photos.

StockVault

stock-img-01

Stockvault.net is an image sharing website that allows designers, photographers and artists alike to share their images and photographs with one another. If you’re a designer in need of photos then all you have to do is quickly register and download all of the images you desire for free.

Pixel Galerie

stock-img-02

Pixel Galerie is not an English site; however, with its wide variety of free stock images it was only fair to include it within this list. Although it may be a bit difficult to read (if you’re not familiar with the language) it is fairly easy to scroll through the sites archives and download your photos.

Free Range

stock-img-03

This site provides high-quality of stock photos for both commercial and non-commercial use. This is all provided for free. Images on Free Range are submitted by talented photographers, shot by the site itself, or taken form a wide variety of archives.

MorgueFile

stock-img-04

MorgueFile offers free photos in various archives for the creative. You can also contribute images in any category listed as well as opt create new categories. The free images on this site are easily searchable, trouble-free to find and simple to download.

EveryStockPhoto

stock-img-05

This gigantic resource site indexes over 3 million photos. This site leans towards being more of a search engine for free photos. It searches hundreds of sites and allows you to specify the license type in order for you to rule out unwanted images.

Stock.xchng

stock-img-06

Stock.xchng is one of the more popular sites for free photos. Searching and browsing through countless numbers of images couldn’t be easier. This site also includes a feature called lightbox; this can come in handy for saving images for later use.

Openphoto

stock-img-07

Openphoto groups all of their images by various categories. They also offer easy search functionality while registration is only necessary if you’d like to upload images.

Unprofound

stock-img-081

Unprofound is can be classified as an unusual or unorthodox site for free stock photos. This is because this site groups images by color, instead of its corresponding category. There is absolutely no search function; however, scavenging through photos isn’t next to impossible. You can also create and online portfolio and contribute to their collection.

PhotoRogue

stock-img-09

Photo Rogue brings something unique and unseen to the online community of free stock photos. This is because they actually take individual online requests for specific images. Their diverse crew of photographers will go out and take your photo for you, all for free!

Geek Philosopher

stock-img-10

Geek Philosopher offers a wide range of categories for free. You don’t have to register, although they simply request that you place the correspondent photo credit when you use an image. Along with the free photos, they also offer backgrounds and various wallpapers.

Woophy

stock-img-11

Woophy uses an incredible map concept and utilizes its home pages as huge map of the world. Every single dot on the entire map represents a photo or group of photos taken at that specific part of the world. This is a special community for travel photographers allowing them to share their images with the entire world.

PhotoRack

stock-img-12

PhotoRack houses a large collection of images in the thousands (over 27,000 to be exact). All of the images are organized in their respectful categories which are broken down into subcategories as well.

FreePixels

stock-img-13

This site offers corporate styled images that are usually found on paid registration sites. You can easily and quickly search for photos as well as make full use of the tag cloud found on the site.

Design Packs

stock-img-14

Design Packs, a small collection of images, grouped into “packs” of 15 images. These images are each in a pack followed by a common theme, such as Money, Flowers, or Lights. These images should appeal to designers and others looking for “abstract” images for backgrounds.

FreeFoto

stock-img-15

Freefoto is made up of 117,600 images with over 150+ sections organized into 3,285 categories. There’s a search function, and usage is completely unrestricted. All you have to do is include an attribution link back to Freefoto.com.

Pixel Perfect Digital

stock-img-1501

Pixel Perfect Digital has a small but quickly growing collection of numerous images. If you register this allows you to upload to your own personal gallery. The search function allows you to search within one or more category while viewing additional images as well.

Free Digital Photos

stock-img-16

Free Digital Photos has a good search function, which is very important when you’ve got this many images under one resource. Photos are nicely grouped into categories for easy and quick browsing.

Public Domain Photos

stock-img-17

Public Domain Photos is exactly that: a photographer’s domain for public display, all arranged by corresponding categories. There’s a really good search function available, as well.

Free Historical Stock Photos

stock-img-18

Free Historical Stock Photos contains various historical images, including many by Matthew Brady (Civil War) and Dorothea Lange (Great Depression). This site also includes paintings and vintage posters. The images are gracefully categorized and easily findable with the use of a search function.

NationsIllustrated

stock-img-19

Nations Illustrated showcases numerous amounts of pictures from all over the world with over 7,000+ photos in its collection. You can effectively browse by city, country, or continent.

Kave Wall

stock-img-20

Kave Wall is a great source of professional-quality close-up and great macro photography. If you need a great shot of paper clips or rubber bands, this is definitely the place.

Free Stock Photos

stock-img-21

Free Stock Photos can be viewed as a small site that contains good quality photographs in both low and high resolution. Photos are grouped into easily searchable categories. The search function utilizes Google however, which doesn’t work that well for images here.

ImageBase

stock-img-22

Photos on Imagebase are absolutely free to use, they are licensed under the Creative Commons license. Images are available in two high resolution (1600 x 1200 or 3072×2048) formats.

Cepolina

stock-img-23

Cepolina is an international site that has photo descriptions in over 17 languages and the ability to browse photos using maps of the world, including specific European countries. You can also browse by definite categories, and use their search function.

Abstract Influence

stock-img-24

This site requires immediate registration in order to enter it, however once you’ve registered you can upload or download, and participate in all of the forums for free. This is a very community-oriented site.

Image After

stock-img-25

Imageafter has over 20,000+ images available. There are two drop-downs (one for textures, one for images) that make it extremely easy to browse desired categories. Imageafter allows you to use their images on printed material for resale as well.

To Conclude

Whether you’re a graphic designer, web developer, or photograph enthusiast there are hundreds of motives on why to use any of these stock photo sites to find absolutely free images for whatever use. Take a few minutes to browse through a couple of these sites and discover interesting and useful photos for a wide range of purposes.

Increase Web Site Performance using PHP and GZIP

Fri Aug 28, 2009 11:01 am MST
Increase Web Site Performance using PHP and GZIP
 

You can use PHP to return compressed content. Give your HTML file a .php extension and add this code to the top:
 

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
 

If you are using Apache Web Server, there are also has two additional compression options:

  • mod_deflate is easier to set up and is standard.
  • mod_gzip is more powerful: you can pre-compress content.

Deflate is quick and works; use mod_gzip for more control. In either case, Apache checks if the browser sent the “Accept-encoding” header and returns the compressed or regular version of the file. However, some older browsers may have trouble and there are special directives you can add to correct this.

Configure Log4J Programmatically for Stand-Alone Applications

Thu Jun 11, 2009 4:11 pm MST

Configure Log4J Programmatically for Stand-Alone Applications

Code Example

import org.apache.log4j.*;

import java.io.IOException;

public class LogTest {

  private static final Logger log = Logger.getLogger(LogTest.class);

  public static void main(String args[]) {
    //BasicConfigurator.configure();

    Logger rootLogger = Logger.getRootLogger();
    rootLogger.setLevel(Level.INFO);
    PatternLayout layout = new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN);
    rootLogger.addAppender(new ConsoleAppender(layout));
    try {
      RollingFileAppender rfa = new RollingFileAppender(layout, "logtest.log");
      rfa.setMaximumFileSize(1000000);
      rootLogger.addAppender(rfa);
    } catch (IOException e) {
      // e.printStackTrace();
    } log.info("Testing...");
  }


}

Another possible PatternLayout to use for more readable format would be:

PatternLayout layout = new PatternLayout("%d{ISO8601} [%t] %-5p %c %x - %m%n");

Installing MySQL without Root Access on Linux

Thu May 7, 2009 3:34 pm MST
Installing MySQL without Root Access on Linux

1. Download tar.gz file distribution from mysql.com and explode to a directory.

2. From base MySQL directory run:

./scripts/mysql_install_db --datadir=[Base MySQL Directory]/data

People
3. From base MySQL directory create some scripts for the following commands to start/stop and access command line:

    Command to Start: 

./bin/mysqld --basedir=[Base MySQL Directory] --datadir=[Base MySQL Directory]/data --log-error=[Base MySQL Directory]/data/mysql.err --pid-file=[Base MySQL Directory]/mysql.pid --socket=[Base MySQL Directory]/thesock --port=3306 &

    Command to Stop:
 
./bin/mysqladmin --socket=[Base MySQL Directory]/thesock shutdown

    Command to Access MySQL database:
 
./bin/mysql --socket=[Base MySQL Directory]/thesock

4. Start loading your data.

© 2018 - Blue Crown Software - (480) 306-6328 Register as New User Login