Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile
View wl-post-php
<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 Oct 27, 2011
jQuery snippit for posting JSON to the Spring3 Controller
View ExtensionAwareBeanNameViewResolver.java
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 Apr 15, 2012
welocally places place JSON object
View place_basic.js
//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 Apr 15, 2012
The most basic use of the welocally place widget
View welocally_placewidget_basic.js
//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 Apr 15, 2012
The most simple use of the welocally places multi widget
View welocally_places_basics.js
//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 Apr 15, 2012
Simple use of the multi place widget to create a map with many places
View welocally_mutiwidget_basic.js
//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 Apr 15, 2012
This is what you need to put in your header fore welocally places
View welocally_places_header.html
<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 Apr 15, 2012
configuration options for a multiplace widget
View welocally_mutiplace_cfg.js
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 Apr 15, 2012
welocally place widget config
View welocally_place_widget_cfg.js
//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 Apr 15, 2012
Welocally Places For Developers
View froggy_styling_place.css
/* 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; }