How to Guide: Creating Custom Layercake URLs for Sharing or Embedding

Creating your own custom view of Layercake is easy! This can be done to share a specific URL with friends or to embed on blogs, websites, etc.

Available customizations include the following options or parameters:

  • Enable 1 or more layers

  • Set the location to be centered on the screen with latitude and longitude

  • Adjust the zoom level of the map

  • Remove buttons for a cleaner look when embedding

If you’re interested in other options to control, please contact us via email (link in the footer).

 

Let’s build an example of a custom view of Layercake to share with a friend:

  1. Start with the address of our web app followed by a forward slash and a question mark:

    Example: https://layerca.ke.com/?

  2. Next, add on parameters. Let’s start with one layer:

    Example: https://layerca.ke/?layer[]=Songkick_SF

  3. Now, let’s add an additional layer:

    Example: https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF

  4. Now, let’s set the center point to be San Francisco:

    Example: https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF&lat=37.8&lng=-122.4

  5. Finally, let’s set a zoom level to see the entire Bay Area:

    Example: https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF&lat=37.8&lng=-122.4&zoom=10

  6. That’s it, you can now share this link with others to see this exact view!

 

Let’s build this same example to be embedded into a blog post:

  1. First, let’s start with the URL we ended with from above:

    Example: https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF&lat=37.8&lng=-122.4&zoom=10

  2. Now, let’s add in the embed control for a cleaner look without the buttons.

    Example: https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF&lat=37.8&lng=-122.4&zoom=10&embed=1

  3. Assuming we’re using basic HTML to embed this into a page, let’s place this inside an iframe to house this view and specify the size as 600 x 800 pixels.

    Example:

    <iframesrc="https://layerca.ke/?layer[]=Songkick_SF&layer[]=Tiki_Bars_SF&lat=37.8&lng=-122.4&zoom=10&embed=1" style="height:600px;width:800px;"></iframe>

  4. And you’re done! This code can be placed into any place where HTML is accepted in order to embed your custom view of Layercake.

 

Parameters Details:

Layers

One or more layers can be added to the URL to allow only those specific layers to appear

Layer names are the same name as found in the menu, followed by an underscore and city abbreviation. Any spaces in the name are replaced with underscores. 

For example, the Songkick layer for San Francisco is named Songkick_SF. The Tiki Bars layer in San Francisco is named Tiki_Bars_SF. A recent listing of available layers in SF is below. For most the most recent layers, please check layerca.ke.

To specify the layer in the URL, use the syntax, &layer[]=Insert_Name_of_Layer_Here.

To specify multiple layers, repeat the above step.

  • Event Layers:

    • Songkick_SF

    • TodayTix_SF

    • Eventbrite_SF

    • Ticketmaster_SF

    • SFWeekly

    • Goldstar_SF

  • Social Layers:

    • Allie_Eats_SF

    • Check_Please_SF

    • CynEats_SF

    • Eat_This_SF_SF

    • Furious_Pete

    • Strictly_Dumpling_SF

  • Food:

    • Anthony_Bourdain_SF

    • Diners_Drive_ins_and_Dives_SF

    • Man_vs_Food_SF

    • Affordable_Michelin_SF

    • SFChronicle

    • Zagat_Best_Restaurants_SF

    • In_N_Out_Burger_SF

    • McDonalds_SF

    • Taco_Bell_SF

    • Del_Taco_SF

    • Tiki_Bars_SF

  • Miscellaneous Layers:

    • Car_Break-ins_SF

    • Poop_SF

    • Heroin_Needles_SF

    • Homeless_Camps_SF

    • Tourist_Spots_SF

    • POPOS_SF

    • BringFido_SF

    • Film_Locations

    • Public_Bathrooms_SF

    • 24_Hour_Fitness_SF

    • Scoot_Scooters_SF

    • Ford_GoBike

    • MCU_SF

    • Potholes_SF

Location

The centered location of the map when the URL is opened can be set by specifying a latitude and longitude. To set the centered location use the following syntax, &lat=XYZ&lng=XYZ.

The latitude and longitude can be set to any number of decimal places.

If the latitude and longitude is not set, the default location is San Francisco, unless the user has enabled their location to be shared. If the user’s location is shared, then their location will be used instead. Specifying a latitude and longitude will override this.

Zoom

The zoom level of the map can be adjusted by using the syntax, &zoom=X. The specified level is a float value starting at 1 as the widest view and becoming more narrower or zoomed in as the number increases.

Embed

The layer, settings, and map buttons can be removed by adding &embed=1. This will remove all of the additional buttons, leaving only the Layercake logo, for a cleaner look when embedding the view into a small space or controlling how much a user can view.