Skip to content

Instantly share code, notes, and snippets.

View claytantor's full-sized avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile
@claytantor
claytantor / wl-post-php
Created September 12, 2011 05:05
trying again
<div class="postEntry">
<?php
if (class_exists("WelocallyPlaces")) {
$wl_plugin = new WelocallyPlaces();
$wl_plugin->addPostPlaceInfo();
}
?>
<?php the_content('Continue reading &raquo;'); ?>
</div>
@claytantor
claytantor / ExtensionAwareBeanNameViewResolver.java
Created October 27, 2011 15:22
jQuery snippit for posting JSON to the Spring3 Controller
package com.welocally.admin.mvc.view;
import java.util.Locale;
import org.apache.log4j.Logger;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;
@claytantor
claytantor / place_basic.js
Created April 15, 2012 06:26
welocally places place JSON object
//places are an array of JSON objects
var places = [
{
"properties": {
"phone": "+1 510 595 8000",
"classifiers": [
{
"category": "Restaurant",
"subcategory": "",
"type": "Food & Drink"
@claytantor
claytantor / welocally_placewidget_basic.js
Created April 15, 2012 07:26
The most basic use of the welocally place widget
//config for the widget
var cfg = { imagePath: 'images/marker_all_base.png'};
//instantiate it
var placeWidget =
new WELOCALLY_PlaceWidget(cfg)
.init();
//load loacally with local place
placeWidget.load(places[0]);
@claytantor
claytantor / welocally_places_basics.js
Created April 15, 2012 16:32
The most simple use of the welocally places multi widget
//used for the pace display
var placeSelected = new WELOCALLY_PlaceWidget({}).init();
//config the widget, use the places array
var cfg = {
id:'multi_trip_1',
zoom: 16,
imagePath: 'images/marker_all_base.png',
observers:[placeSelected],
places: places
@claytantor
claytantor / welocally_mutiwidget_basic.js
Created April 15, 2012 16:42
Simple use of the multi place widget to create a map with many places
//used for the place display when selected
var placeSelected = new WELOCALLY_PlaceWidget({}).init();
//config the widget, use the places array
var cfg = {
id:'multi_map_1',
imagePath: 'images/marker_all_base.png',
observers:[placeSelected],
places: places
};
@claytantor
claytantor / welocally_places_header.html
Created April 15, 2012 18:38
This is what you need to put in your header fore welocally places
<head>
<!--scripts, google maps V3 (no key), jquery, jquery-ui, and welocally places -->
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
<script src="js/wl_base.js" type="text/javascript"></script>
<script src="js/wl_place_widget.js" type="text/javascript"></script>
<script src="js/wl_places_multi_widget.js" type="text/javascript"></script>
<script src="js/wl_infobox.js" type="text/javascript"></script>
@claytantor
claytantor / welocally_mutiplace_cfg.js
Created April 15, 2012 19:04
configuration options for a multiplace widget
var cfg = {
id:'wl_multiplace_1',
showLetters: true,
overrideSelectableStyle:
'width:98%;',
imagePath:
'images/marker_all_base.png',
showSelection: true,
places: places,
observers:[placeSelected],
@claytantor
claytantor / welocally_place_widget_cfg.js
Created April 15, 2012 19:23
welocally place widget config
//config for the widget
var cfg = {
id: 'place-4627',
zoom: 16,
imagePath: 'images/marker_all_base.png'
styles: [
{
stylers: [
{ saturation: -45 }
]
@claytantor
claytantor / froggy_styling_place.css
Created April 15, 2012 20:14
Welocally Places For Developers
/* omitting styles that are not customized */
/* overall style for place widget */
.welocally_place_widget {
font-family: 'Oxygen', verdana, sans-serif;
font-size: 0.8em;
border:2px solid #aca;
background-color: #586B49;
padding:0px; }