Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Visualize your local tech startup community on a custom Google Map. Host everyth
About RepresentMap
------------------

You can use RepresentMap to setup a website that visualizes your local startup
You can use RepresentMap to setup a website that visualizes your local startup
community on a custom Google map.

This code first came from http://represent.la, our map of the Los Angeles
Expand Down Expand Up @@ -39,23 +39,24 @@ Setup should be super easy. Follow these steps:
2. Use phpMyAdmin or another MySQL utility to run each of the SQL files in the /db directory.
3. Open /include/db_example.php with your text editor. Enter your MySQL credentials in there. Also, replace "letsgetmappy" with a new password for the admin panel. Rename the file to "db.php".
4. Upload all of the files to your server.
5. You'll probably want to comb through index.php with your favorite text editor and replace all the RepresentLA content
5. Update the include/config.php file with your own Google Maps API Key (https://developers.google.com/maps/documentation/javascript/get-api-key)
6. You'll probably want to comb through index.php with your favorite text editor and replace all the RepresentLA content
(logo, "more info" text, Twitter/Facebook share buttons, etc.) with your own stuff.
6. Populate your database. We recommend seeding it with some existing data before opening it up to your local community.
7. Populate your database. We recommend seeding it with some existing data before opening it up to your local community.
You can add markers by using the button on the map page, or by importing them with an SQL query. If you use an SQL
query, note that you should leave the lat/long values blank when importing. Then, run geocode.php to automatically
generate lat/long values for all your rows.
7. Once visitors to your site have submitted their own markers, point your browser to /admin to approve/reject them.
8. Challenge your newly-discovered neighbors to ping pong!
8. Once visitors to your site have submitted their own markers, point your browser to /admin to approve/reject them.
9. Challenge your newly-discovered neighbors to ping pong!


Startup Genome Integration (optional)
-------------------------------------

Startup Genome is a project that "enables local startup communities to collect, curate, and display
their city's data anyway they want." Integrating your map with Startup Genome will allow people to
keep their profile updated over time and it's a great way to show the rest of the world what's
happening in your startup community. There's also nice interface that lets you and other curators
their city's data anyway they want." Integrating your map with Startup Genome will allow people to
keep their profile updated over time and it's a great way to show the rest of the world what's
happening in your startup community. There's also nice interface that lets you and other curators
manage your map data.

If you want to pull your map data from Startup Genome, check out the settings in your db.php.
Expand Down
20 changes: 10 additions & 10 deletions represent-map/admin/header.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?php
include "../include/db.php";
// get task
if(isset($_GET['task'])) { $task = $_GET['task']; }
if(isset($_GET['task'])) { $task = $_GET['task']; }
else if(isset($_POST['task'])) { $task = $_POST['task']; }

// get view
if(isset($_GET['view'])) { $view = $_GET['view']; }
if(isset($_GET['view'])) { $view = $_GET['view']; }
else if(isset($_POST['view'])) { $view = $_POST['view']; }
else { $view = ""; }

// get page
if(isset($_GET['p'])) { $p = $_GET['p']; }
if(isset($_GET['p'])) { $p = $_GET['p']; }
else if(isset($_POST['p'])) { $p = $_POST['p']; }
else { $p = 1; }

// get search
if(isset($_GET['search'])) { $search = $_GET['search']; }
if(isset($_GET['search'])) { $search = $_GET['search']; }
else if(isset($_POST['search'])) { $search = $_POST['search']; }
else { $search = ""; }

Expand Down Expand Up @@ -45,9 +45,9 @@
<link href='../bootstrap/css/bootstrap.css' rel='stylesheet' type='text/css' />
<link href='../bootstrap/css/bootstrap-responsive.css' rel='stylesheet' type='text/css' />
<link rel='stylesheet' href='admin.css' type='text/css' />
<script src='../bootstrap/js/bootstrap.js' type='text/javascript' charset='utf-8'></script>
<script src='../scripts/jquery-1.7.1.js' type='text/javascript' charset='utf-8'></script>
<script src='https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false' type='text/javascript' charset='utf-8'></script>
<script src='../bootstrap/js/bootstrap.js' type='text/javascript' charset='utf-8'></script>
<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false&key=" . GOOGLE_MAPS_API_KEY . "'></script>
</head>
<body>
";
Expand Down Expand Up @@ -103,17 +103,17 @@
$admin_head .= "
<div class='alert alert-info'>
Note: You have Startup Genome integration enabled in your config file (/include/db.php).
If you want to make changes to the markers on your map, please do so from the
If you want to make changes to the markers on your map, please do so from the
<a href='http://www.startupgenome.com'>Startup Genome website</a>. Any changes
you make here may not persist on your map unless you turn off Startup Genome mode.
</div>
";
";
}




// admin footer
// admin footer
$admin_foot = "
</div>
</body>
Expand All @@ -123,4 +123,4 @@



?>
?>
7 changes: 7 additions & 0 deletions represent-map/include/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// You can follow the instructions here to generate your key:
// https://developers.google.com/maps/documentation/javascript/get-api-key
define('GOOGLE_MAPS_API_KEY', 'YOUR_KEY_HERE')

?>
2 changes: 1 addition & 1 deletion represent-map/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<script src="./scripts/jquery-1.7.1.js" type="text/javascript" charset="utf-8"></script>
<script src="./bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
<script src="./bootstrap/js/bootstrap-typeahead.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false&key=<?php echo GOOGLE_MAPS_API_KEY; ?>'></script>
<script type="text/javascript" src="./scripts/label.js"></script>

<script type="text/javascript">
Expand Down