Giter Site home page Giter Site logo

welocally-places-developer's Introduction

README v 1.1.8

Basic documentation include in examples/demo.html

What is a Welocally Place?

Welocally Places For Developers is a set of jQuery based javascript widgets that make it easy to create highly styled customized maps using Google Maps API v3. Its perfect for creating business directory websites, travel sites, real estate guides or any website where you want to go beyond the look and feel of Google Maps and showcase real world places.

It is founded around the data of places. Simply put, a place is all the relevant facts about a real world location, like its name, location, phone number, and website. This data is then used to set the map location and create place cards or marker maps.

//places are an array of JSON objects
var places = [
  {				                       
      "properties": {
          "phone": "+1 510 595 8000",
          "classifiers": [
              {
                  "category": "Restaurant",
                  "subcategory": "",
                  "type": "Food & Drink"
              }
          ],
          "titlelink": "http://oaklandly.com/sicily-pizza",
          "website": "http://www.sicilypizzapasta.com",
          "address": "138 14th St",
          "name": "Gourmet Sicily Pizza",
          "province": "CA",
          "owner": "welocally",
          "postcode": "94612",
          "country": "US",
          "city": "Oakland"
      },
      "geometry": {
          "type": "Point",
          "coordinates": [
              -122.2636,
              37.801379
          ]
      }
  }
];

Our primary goal is to combine a number of aspects of the Google Maps API into a single easy to use set of components, helping developers build beautiful and unique hyper-local websites with ease.

Place Widget

The place widget creates a pin card for a specific place. It perfect for showcasing a specific location. Of course all of the Google Maps Capabilities work also, so users can use street view to get curb appeal quickly.

//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]);

Multi Places Widget

The multi places widget will automatically scale to the correct view bounds to include all the place markers. When a user selects a specific place marker details like website or phone number and driving directions become visible and the map will center. This map is great for creating a set of places with a specific category, such as "Shopping" or a travel map.

//used for the place display when selected (observed)
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
};

//it both objects 
placeSelected.initCfg(cfg);
var placesMulti = 
	  new WELOCALLY_PlacesMultiWidget(cfg)
  		.init(); 

//setup the selected area, display selected
placesMulti.getSelectedArea().append(
  placeSelected.makeWrapper());

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.