1stwebdesigner |
50 Meaningful and Creative Logos with Thoughts Behind Them Posted: 20 Sep 2010 02:00 PM PDT When it comes to describing what a good logo is, this old saying comes in handy: “A good logo is a dead logo”… Uhm, well, ok I’m just kidding :). Actually, it’s quite the opposite. A good logo is a logo that lives. The collection below features great, creative logos that have a message hidden. They try to convey that message through type, shape, negative space, and by triggering image and/or meaning associations in our minds. Enjoy! I realize not everyone gets it from the moment they look at it for the first time, so I allowed myself to add a short description to every logo. 1) Doghouse Brewing Co.
2) Matrimony
3) Pizza Time
4) Cloud Corner
5) Bee
6) Beercation
7) Love Clip
8) Fly
9) Fitmiss
10) Fold It
11) Families
12) The Golf Park
13) Heart Build Foundation
14) Invisible Agents
15) Killed Productions
16) Locks
17) Mister Cutts Baber Shop
18) Wine Searcher
19) Newcastle Food & Wine Festival
20) CinemaCafe
21) Baloon Chef
22) Cowbra Productions
23) CityCliq
24) Dig for Saint Michael’s
25) Iron Duck Clothing
26) MonKey
27) Martini House
28) Filmurbia
29) ChemisTree
30) Black Cat
31) Brain Finger
32) uReach Media
33) Econergy
34) Rocket Golf
35) Hole
36) Optical Strength
37) Evolution X
38) BarCode
39) Water Empire
40) Lost
41) Devil’s Music
42) SoundDog
43) Wiesinger Music Piano Service
44) VinoPiano Elegant Taste
45) Long Neck Music
46) Pelican
47) Pilot CMS
48) Shocked Film Group
49) Shutterbug
50) Water Drop
That’s all folks!I hope you had fun looking at this collection and figuring out what each logo is trying to tell you :). I sure did! |
Creating an Interactive Travel Map using the Google Maps API Posted: 20 Sep 2010 03:00 AM PDT This is my third tutorial on the Google Maps API v3. I'm going to show you how to use some other google maps features by building an interactive travel map. Everyone will be able to add new locations on the map and view the locations added by others. We will also be using MySQL databases to store the values of different locations so let’s get started. What google maps features you'll learn?
Prerequisites The application is built using html, php and javascript and also saves the locations in a mysql database. It would be best if you had some basic knowledge of these. What are we going to build? We're going to build an interactive travel map. Everyone will be able to see the locations on the map and also add new ones easily. We'll save some info about each location (coordinates, address, a description, a photo and data about the person who added the location). Users will be able to add locations by clicking on the map to find out the coordinates and address and by filling in the rest of the info. The users will also be able to view all the locations from the database. For viewing them easier, we'll add a location list the user can browse and we will highlight a location on the map when the user goes with the mouse pointer over the location name. You can view the app here! And also download the source code from here. Creating the database table First we have to create a table in our database to save the data about the locations on the map. We'll save the following data about each location:
Here's how the code for creating the table looks like: CREATE TABLE IF NOT EXISTS `locations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `description` text NOT NULL, `photo` text NOT NULL, `latitude` double NOT NULL, `longitude` double NOT NULL, `address` text NOT NULL, `user_name` text NOT NULL, `user_location` text NOT NULL, PRIMARY KEY (`id`)); Creating the layout for our app We'll use a simple layout. We'll show a title and some info about our app at the top of the page. Below that we'll add three columns, one for adding locations (with a form for adding new locations), one for the map (a div called ‘map_canvas’) and one for the locations list. Since the code is pretty long I’ve decided not to post it here, but you can see it in the source code of the app. Connecting to the database and getting the info about the locations To get the data from the database we'll first have to connect to it. We'll create a small php script for this and save it in the ‘connect.php’ file. The script looks like this: $server = "WRITE_SERVER_NAME_HERE"; $username = "WRITE_USERNAME_HERE"; $password = "WRITE_PASSWORD_HERE"; $database = "WRITE_DATABASE_NAME_HERE"; $connId = mysql_connect($server,$username,$password) or die("Cannot connect to server"); $selectDb = mysql_select_db($database,$connId) or die("Cannot connect to database"); Don't forget to fill in your data! We'll include this script in our main file and the database connection is done! We'll add the following lines at the beginning of our main file: <?php include "connect.php"; ?> Now we need to find out the number of locations and the information about all the locations in the database. Here's how: $locations = mysql_query("select * from locations"); $nr_locations = mysql_num_rows($locations); We have done a simple query to the database and retrieved the info about the locations in the $locations variable. We have also found out the total number of saved locations. We will print this in the text we’ll show on top of our page: Click on the map to add a new location! Total locations added: <?php echo $nr_locations;?> We also have to print the location list, like this: <?php // find locations from db // save data for locations $lats = ""; // string with latitude values $lngs = ""; // string with longitude values $addresses = ""; // string with address values $names = ""; // string with names $descrs = ""; // string with descriptions $photos = ""; // string with photo names $user_names = ""; // string with user names $user_locs = ""; // string with user locations $i=0; // take the locations from the db one by one while ($locat = mysql_fetch_array($locations)) { // add location data to info strings $lats .= $locat['latitude'].";;"; $lngs .= $locat['longitude'].";;"; $addresses .= $locat['address'].";;"; $names .= $locat['name'].";;"; $descrs .= $locat['description'].";;"; $photos .= $locat['photo'].";;"; $user_names .= $locat['user_name'].";;"; $user_locs .= $locat['user_location'].";;"; // show the location name in the right of the map with link that calls the highlightMarker function ?> <a onmouseover="highlightMarker(<?php echo $i;?>)"><?php echo $locat['name'];?></a> <br/> <?php $i++; } // hidden inputs for saving the info for all the locations in the db ?> <input type="hidden" value="<?php echo $lats;?>" id="lats" name="lats"/> <input type="hidden" value="<?php echo $lngs;?>" id="lngs" name="lngs"/> <input type="hidden" value="<?php echo $addresses;?>" id="addresses" name="addresses"/> <input type="hidden" value="<?php echo $names;?>" id="names" name="names"/> <input type="hidden" value="<?php echo $descrs;?>" id="descrs" name="descrs"/> <input type="hidden" value="<?php echo $photos;?>" id="photos" name="photos"/> <input type="hidden" value="<?php echo $user_names;?>" id="user_names" name="user_names"/> <input type="hidden" value="<?php echo $user_locs;?>" id="user_locs" name="user_locs"/> We have shown the location names as links. When the user goes with the mouse over the links, the highlightMarker JavaScript function is called. We'll take a look at it a bit later. We have also saved the information about the locations in hidden input fields. We will use the info from the hidden fields to show the locations on the map. Showing the map To add the map we will first have to include the google maps api, like so: <script src="http://maps.google.com/maps/api/js?sensor=true"></script> Now, we'll define a javascript function called initialize to show the map in the div created for it. We will call this function after the page is loaded. Here's how to call the function when the page loads: <body onload="initialize();"> And here's the function code: <script> var geocoder; var map; // initializing the map function initialize() { // define map center var latlng = new google.maps.LatLng(57.279043,29.355469); // define map options var myOptions = { zoom: 3, center: latlng, mapTypeId: google.maps.MapTypeId.HYBRID, scaleControl: true, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL }, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU } }; // initialize map map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); // add event listener for when a user clicks on the map google.maps.event.addListener(map, 'click', function(event) { findAddress(event.latLng); }); } </script> To create a map, we first have to define the options for showing the map. We have set the zoom level, the center of the map. Next, we have set the controls to show on the map: scale control, navigation and map type and we have defined some options for it. We have chosen to show a small navigation control and to show the map type control as a drop down menu. You can view all the options available for controls in the API reference. Then, we initialize the map object and add an event for when the user clicks on the map. When this event is fired, the findAddress function will be called. The function takes as an argument the coordinates of the point where the user clicked on the map. // finds the address for the given location function findAddress(loc) { geocoder = new google.maps.Geocoder(); if (geocoder) { geocoder.geocode({'latLng': loc}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { address = results[0].formatted_address; // fill in the results in the form document.getElementById('lat').value = loc.lat(); document.getElementById('long').value = loc.lng(); document.getElementById('address').value = address; } } else { alert("Geocoder failed due to: " + status); } }); } } This function uses the geocoding service from google maps to find the address corresponding to the coordinates where the user clicked on the map. When the function get the results from google, it shows the results in our form: // fill in the results in the form document.getElementById('lat').value = loc.lat(); document.getElementById('long').value = loc.lng(); document.getElementById('address').value = address; The user will just have to fill in the rest of the data to add a new location. I’ve not included here the php code to add the location to the database. You can see that in the source code! Showing the markers We will also have to show the locations on the map when it loads. We will call one more function when the page loads: <body onload="initialize(); addMarkers()"> Let's see how the function looks like: // initialize the array of markers var markers = new Array(); // the function that adds the markers to the map function addMarkers() { // get the values for the markers from the hidden elements in the form var lats = document.getElementById('lats').value; var lngs = document.getElementById('lngs').value; var addresses = document.getElementById('addresses').value; var names = document.getElementById('names').value; var descrs = document.getElementById('descrs').value; var photos = document.getElementById('photos').value; var user_names = document.getElementById('user_names').value; var user_locs = document.getElementById('user_locs').value; var las = lats.split(";;") var lgs = lngs.split(";;") var ads = addresses.split(";;") var nms = names.split(";;") var dss = descrs.split(";;") var phs = photos.split(";;") var usrn = user_names.split(";;") var usrl = user_locs.split(";;") // for every location, create a new marker and infowindow for it for (i=0; i<las.length; i++) { if (las[i] != "") { // add marker var loc = new google.maps.LatLng(las[i],lgs[i]); var marker = new google.maps.Marker({ position: loc, map: window.map, title: nms[i] }); markers[i] = marker; var contentString = [ '<div>', '<ul>', '<li><a href="#tab-1"><span>photo</span></a></li>', '<li><a href="#tab-2"><span>description</span></a></li>', '<li><a href="#tab-3"><span>location</span></a></li>', '</ul>', '<div>', '<p><h1>'+nms[i]+'</h1></p>', '<p><img src="./photos/'+phs[i]+'"/></p>'+ '</div>', '<div>', '<p><h1>'+nms[i]+'</h1></p>', '<p>Added by: '+usrn[i]+' from '+usrl[i]+'</p>'+ '<p>'+dss[i]+'</p>'+ '</div>', '<div>', '<p><h1>'+nms[i]+'</h1></p>', '<p>Address: '+ads[i]+'</p>'+ '<p>Location: '+loc+'</p>'+ '</div>', '</div>' ].join(''); var infowindow = new google.maps.InfoWindow; bindInfoWindow(marker, window.map, infowindow, contentString); } } } // make conection between infowindow and marker (the infowindow shows up when the user goes with the mouse over the marker) function bindInfoWindow(marker, map, infoWindow, contentString) { google.maps.event.addListener(marker, 'mouseover', function() { map.setCenter(marker.getPosition()); infoWindow.setContent(contentString); infoWindow.open(map, marker); $("#tabs").tabs(); }); } We will also save the markers in an array. We will take the information about the locations from the hidden input fields we have created earlier. We will create a new marker for each of the locations. The title of the marker will be the location name. We'll also create some infowindows to show when the user goes with the mouse over the markers. As you can see, we have used another function to bind each marker to its infowindow. We've also centered the map on the marker when the user goes with the mouse over it. To show the information about the markers in the infowindow nicely, I have decided to use some sample code I found here. It uses jquery and jqueryui. We will also have to include these for the script to work: <script src="jquery-1.4.2.min.js"></script> <script src="jquery-ui-1.8rc3.custom.min.js"></script> <link href="jquery-ui-1.8rc3.custom.css" rel="stylesheet" /> And we're almost done! All there's left to do now is the highlightMarker function, the one called when the users goes with the mouse pointer over a location name in the location list. Let's take a look at the function: // highlighting a marker // make the marker show on top of the others // change the selected markers icon function highlightMarker(index) { // change zindex and icon for (i=0; i<markers.length; i++) { if (i == index) { markers[i].setZIndex(10); markers[i].setIcon('http://www.google.com/mapfiles/arrow.png'); } else { markers[i].setZIndex(2); markers[i].setIcon('http://www.google.com/mapfiles/marker.png'); } } } The function takes as an argument the index of the marker in the markers array we have created. The highlightMarker function will make the selected marker show up on top of the other markers and change its icon. To make the marker on top of the others, we have to change the zIndex value of the marker. The marker with the biggest value will show on top. We have set the selected markers value to 10 and the values of the rest of them to 2 (using the setZIndex function). We have also changed the icon of the marker with the setIcon function. You might have noticed I also added a small javascript function to check if the user filled in all the information from the add form. The function is called when the form is submitted. It just checks the values filled in the form and if one of them is missing, it will show and error message and prevent the form from submitting. And that's it! We now have an interactive travel map! |
You are subscribed to email updates from 1stwebdesigner - Graphic and Web Design Blog To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Comments (0)
Post a Comment