Skip to content
Browse files

Rearranged few things, improved identify.

  • Loading branch information...
1 parent 8ab6180 commit 9010efa22d590c63164735a7069a88b629325088 @tobinbradley committed Jul 13, 2012
Showing with 209 additions and 195 deletions.
  1. +184 −184 default.htm
  2. BIN favicon.png
  3. +22 −6 js/map.js
  4. +2 −3 js/script.js
  5. +1 −2 manifest.appcache
View
368 default.htm
@@ -238,88 +238,6 @@ <h3 id="PROPERTY"><a href="#">Property</a></h3>
</p>
</div>
- <h3 id="ENVIRONMENT"><a href="#">Environment</a></h3>
- <div>
- <div>
- <h5>Search Results</h5>
- <span class="selectedLocation">No records selected.</span>
- </div>
- <div class="cutout toggleLayersArea screen-only">
- <h5>Toggle Layers</h5>
- <a href="javascript:void(0)" data-layer="Environmental Layers" class="toggleLayer" title="Regulated Floodplains, Water Quality Buffers, MPL Sites, Landfills">Environmental Layers</a>,
- <a href="javascript:void(0)" data-layer="Soil Types" class="toggleLayer">Soil Types</a>
- </div>
- <h5 class="selected-data hidden environment-list-heading">Critical Information</h5>
- <ul class="selected-data hidden environment-list selected-data-clear" id="environment_critical"></ul>
-
- <h5 class="selected-data hidden">General Information</h5>
- <ul class="selected-data hidden environment-list selected-data-clear" id="environment_general"></ul>
-
- <p class="mute">
- For more information, try:
- <a href="http://charmeck.org/mecklenburg/county/WaterandLandResources/Pages/default.aspx" target="_blank">Water &amp; Land Resources</a>,
- <a href="ftp://ftp1.co.mecklenburg.nc.us/WaterQuality/WQ%20Buffers/WaterQualityBufferImplementationGuidelines.pdf" target="_blank">
- Water Quality Buffer Implementation Guidelines</a>, <a href="http://charmeck.org/mecklenburg/county/AirQuality/Pages/default.aspx" target="_blank">Air Quality</a>.
- <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
- </p>
- </div>
-
-
- <h3 id="TRANSPORTATION"><a href="javascript:void(0)">Transportation</a></h3>
- <div>
- <div>
- <h5>Search Results</h5>
- <span class="selectedLocation">No records selected.</span>
- </div>
- <div id="bus-stops" class="selected-data hidden">
- <table class="datatable">
- <caption>5 Nearest CATS Bus Stops</caption>
- <thead>
- <tr>
- <th class="ui-state-default"></th>
- <th class="ui-state-default"></th>
- <th class="ui-state-default">Bus Stop</th>
- <th class="ui-state-default">Routes</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="park-and-rides" class="selected-data hidden">
- <table class="datatable">
- <caption>3 Nearest CATS Park & Ride</caption>
- <thead>
- <tr>
- <th class="ui-state-default"></th>
- <th class="ui-state-default"></th>
- <th class="ui-state-default">Bus Stop</th>
- <th class="ui-state-default">Address</th>
- <th class="ui-state-default">Routes</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="light-rail-stops" class="selected-data hidden">
- <table class="datatable">
- <caption>3 Nearest CATS Lynx Stops</caption>
- <thead>
- <tr>
- <th class="ui-state-default"></th>
- <th class="ui-state-default"></th>
- <th class="ui-state-default">Bus Stop</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <p class="mute">For more information, try:
- <a href="http://charmeck.org/city/charlotte/cats" target="_blank">CATS</a>.
- <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
- </p>
- </div>
-
-
<h3 id="SERVICES"><a href="javascript:void(0)">Services</a></h3>
<div>
<div>
@@ -405,108 +323,6 @@ <h3 id="SERVICES"><a href="javascript:void(0)">Services</a></h3>
</p>
</div>
- <h3 id="ECONOMIC_DEVELOPMENT"><a href="#">Economic Development</a></h3>
- <div>
- <div>
- <h5>Search Results</h5>
- <span class="selectedLocation">No records selected.</span>
- </div>
- <div class="cutout toggleLayersArea screen-only">
- <h5>Toggle Layers</h5>
- <a href="javascript:void(0)" data-layer="Economic Development" class="toggleLayer" title="Development Corridors, Zoning, Building Permits, Development Loans, Business Investment Program">Economic Development</a>
- </div>
- <div id="parcel_ed" class="selected-data hidden">
- <table class="datatable">
- <caption>Zoning</caption>
- <thead>
- <tr>
- <th class="ui-state-default">Jurisdiction</th>
- <th class="ui-state-default">Zoning</th>
- <th class="ui-state-default">Description</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="parcel_ed_building_permits" class="selected-data hidden">
- <table class="datatable">
- <caption>Parcel Building Permits</caption>
- <thead>
- <tr>
- <th class="ui-state-default">Year</th>
- <th class="ui-state-default">Project Name</th>
- <th class="ui-state-default">SQ FT</th>
- <th class="ui-state-default">Construction Cost (Est)</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="corridor_permits_1" class="selected-data hidden">
- <table class="datatable">
- <caption>Corridor Funding and Permits</caption>
- <thead>
- <tr>
- <th class="ui-state-default">Name</th>
- <th class="ui-state-default">Type</th>
- <th class="ui-state-default">City Loans &amp; Grants</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="corridor_permits_2" class="selected-data hidden">
- <table class="datatable">
- <thead>
- <tr>
- <th class="ui-state-default">Year</th>
- <th class="ui-state-default">QTR</th>
- <th class="ui-state-default">Projects</th>
- <th class="ui-state-default">SQ FT</th>
- <th class="ui-state-default">Const. Value</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="grantsandloans" class="selected-data hidden">
- <table class="datatable">
- <caption>Parcel Funding</caption>
- <thead>
- <tr>
- <th class="ui-state-default">Type</th>
- <th class="ui-state-default">Business Name</th>
- <th class="ui-state-default">Award Date</th>
- <th class="ui-state-default">Award Amount</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <div id="business_investment" class="selected-data hidden">
- <table class="datatable">
- <caption>Business Investment Program</caption>
- <thead>
- <tr>
- <th class="ui-state-default">Business Name</th>
- <th class="ui-state-default">Year</th>
- <th class="ui-state-default">Investment</th>
- <th class="ui-state-default">Jobs Created or Saved</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <p class="mute">
- For more information, try:
- <a href="http://charmeck.org/mecklenburg/county/edo/Pages/default.aspx" target="_blank">Economic Development</a>,
- <a href="http://charmeck.org/city/charlotte/nbs" target="_blank">Neighborhood and Business Services</a>,
- <a href="http://charmeck.org/city/charlotte/planning" target="_blank">Planning Department</a>,
- <a href="http://charmeck.org/mecklenburg/county/LUESA" target="_blank">LUESA</a>.
- <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
- </p>
- </div>
-
<h3 id="SCHOOLS"><a href="#">Schools</a></h3>
<div>
<div>
@@ -694,6 +510,190 @@ <h3 id="VOTING"><a href="#">Voting</a></h3>
</p>
</div>
+ <h3 id="ENVIRONMENT"><a href="#">Environment</a></h3>
+ <div>
+ <div>
+ <h5>Search Results</h5>
+ <span class="selectedLocation">No records selected.</span>
+ </div>
+ <div class="cutout toggleLayersArea screen-only">
+ <h5>Toggle Layers</h5>
+ <a href="javascript:void(0)" data-layer="Environmental Layers" class="toggleLayer" title="Regulated Floodplains, Water Quality Buffers, MPL Sites, Landfills">Environmental Layers</a>,
+ <a href="javascript:void(0)" data-layer="Impervious Surface" class="toggleLayer">Impervious Surface</a>,
+ <a href="javascript:void(0)" data-layer="Soil Types" class="toggleLayer">Soil Map</a>
+ </div>
+ <h5 class="selected-data hidden environment-list-heading">Critical Information</h5>
+ <ul class="selected-data hidden environment-list selected-data-clear" id="environment_critical"></ul>
+
+ <h5 class="selected-data hidden">General Information</h5>
+ <ul class="selected-data hidden environment-list selected-data-clear" id="environment_general"></ul>
+
+ <p class="mute">
+ For more information, try:
+ <a href="http://charmeck.org/mecklenburg/county/WaterandLandResources/Pages/default.aspx" target="_blank">Water &amp; Land Resources</a>,
+ <a href="ftp://ftp1.co.mecklenburg.nc.us/WaterQuality/WQ%20Buffers/WaterQualityBufferImplementationGuidelines.pdf" target="_blank">
+ Water Quality Buffer Implementation Guidelines</a>, <a href="http://charmeck.org/mecklenburg/county/AirQuality/Pages/default.aspx" target="_blank">Air Quality</a>.
+ <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
+ </p>
+ </div>
+
+
+ <h3 id="TRANSPORTATION"><a href="javascript:void(0)">Transportation</a></h3>
+ <div>
+ <div>
+ <h5>Search Results</h5>
+ <span class="selectedLocation">No records selected.</span>
+ </div>
+ <div id="bus-stops" class="selected-data hidden">
+ <table class="datatable">
+ <caption>5 Nearest CATS Bus Stops</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default">Bus Stop</th>
+ <th class="ui-state-default">Routes</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="park-and-rides" class="selected-data hidden">
+ <table class="datatable">
+ <caption>3 Nearest CATS Park & Ride</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default">Bus Stop</th>
+ <th class="ui-state-default">Address</th>
+ <th class="ui-state-default">Routes</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="light-rail-stops" class="selected-data hidden">
+ <table class="datatable">
+ <caption>3 Nearest CATS Lynx Stops</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default"></th>
+ <th class="ui-state-default">Bus Stop</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <p class="mute">For more information, try:
+ <a href="http://charmeck.org/city/charlotte/cats" target="_blank">CATS</a>.
+ <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
+ </p>
+ </div>
+
+ <h3 id="ECONOMIC_DEVELOPMENT"><a href="#">Economic Development</a></h3>
+ <div>
+ <div>
+ <h5>Search Results</h5>
+ <span class="selectedLocation">No records selected.</span>
+ </div>
+ <div class="cutout toggleLayersArea screen-only">
+ <h5>Toggle Layers</h5>
+ <a href="javascript:void(0)" data-layer="Economic Development" class="toggleLayer" title="Development Corridors, Zoning, Building Permits, Development Loans, Business Investment Program">Economic Development</a>
+ </div>
+ <div id="parcel_ed" class="selected-data hidden">
+ <table class="datatable">
+ <caption>Zoning</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default">Jurisdiction</th>
+ <th class="ui-state-default">Zoning</th>
+ <th class="ui-state-default">Description</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="parcel_ed_building_permits" class="selected-data hidden">
+ <table class="datatable">
+ <caption>Parcel Building Permits</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default">Year</th>
+ <th class="ui-state-default">Project Name</th>
+ <th class="ui-state-default">SQ FT</th>
+ <th class="ui-state-default">Construction Cost (Est)</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="corridor_permits_1" class="selected-data hidden">
+ <table class="datatable">
+ <caption>Corridor Funding and Permits</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default">Name</th>
+ <th class="ui-state-default">Type</th>
+ <th class="ui-state-default">City Loans &amp; Grants</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="corridor_permits_2" class="selected-data hidden">
+ <table class="datatable">
+ <thead>
+ <tr>
+ <th class="ui-state-default">Year</th>
+ <th class="ui-state-default">QTR</th>
+ <th class="ui-state-default">Projects</th>
+ <th class="ui-state-default">SQ FT</th>
+ <th class="ui-state-default">Const. Value</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="grantsandloans" class="selected-data hidden">
+ <table class="datatable">
+ <caption>Parcel Funding</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default">Type</th>
+ <th class="ui-state-default">Business Name</th>
+ <th class="ui-state-default">Award Date</th>
+ <th class="ui-state-default">Award Amount</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <div id="business_investment" class="selected-data hidden">
+ <table class="datatable">
+ <caption>Business Investment Program</caption>
+ <thead>
+ <tr>
+ <th class="ui-state-default">Business Name</th>
+ <th class="ui-state-default">Year</th>
+ <th class="ui-state-default">Investment</th>
+ <th class="ui-state-default">Jobs Created or Saved</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ <p class="mute">
+ For more information, try:
+ <a href="http://charmeck.org/mecklenburg/county/edo/Pages/default.aspx" target="_blank">Economic Development</a>,
+ <a href="http://charmeck.org/city/charlotte/nbs" target="_blank">Neighborhood and Business Services</a>,
+ <a href="http://charmeck.org/city/charlotte/planning" target="_blank">Planning Department</a>,
+ <a href="http://charmeck.org/mecklenburg/county/LUESA" target="_blank">LUESA</a>.
+ <br /><a class='report_data_error' href="javascript:void(0);">Report a Problem</a>
+ </p>
+ </div>
+
<h3 id="COMMUNITY"><a href="#">Community</a></h3>
<div>
<div>
View
BIN favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
28 js/map.js
@@ -59,7 +59,6 @@ function initializeMap() {
} catch (err) {}
// For routing
- directionsDisplay.setMap(map);
directionsDisplay.setPanel(document.getElementById("directionsPanel"));
/* Locate user position via GeoLocation API */
@@ -282,12 +281,13 @@ function toolbar(tool) {
clickListener = google.maps.event.addListener(map, 'click', function(event) {
if (map.getZoom() >= 16) {
url = pointOverlay(event.latLng.lng(), event.latLng.lat(), 4326, 'tax_parcels', 'pid', "", 'json', '?');
- $.getJSON(url, function(data) {
+ $.getJSON(url, function(data) { // Get the parcel ID
if (data.total_rows > 0) {
+ var pid = data.rows[0].row.pid;
url = config.web_service_base + "v1/ws_mat_pidgeocode.php?format=json&callback=?";
- args = "&pid=" + urlencode(data.rows[0].row.pid);
+ args = "&pid=" + urlencode(pid);
url = url + args;
- $.getJSON(url, function(data) {
+ $.getJSON(url, function(data) { // Try to find a match in the MAT
if (data.total_rows > 0) {
message = "<h5>Identfy</h5>" + data.rows[0].row.address + "<br />PID: " + data.rows[0].row.parcel_id;
message += "<br /><br /><strong><a href='javascript:void(0)' class='identify_select' data-matid='" + data.rows[0].row.objectid + "' onclick='locationFinder(\"Address\", \"master_address_table\", \"objectid\", " + data.rows[0].row.objectid + ");'>Select this Location</a></strong>";
@@ -298,6 +298,21 @@ function toolbar(tool) {
"label": message
}]);
}
+ else { // If no MAT match try a parcel to MAT spatial intersection
+ url = featureOverlay("tax_parcels", "master_address_table", "t.objectid, t.full_address as address,t.num_parent_parcel as parcel_id, x(transform(SETSRID(makepoint(num_x_coord , num_y_coord), 2264), 4326)) as longitude, y(transform(SETSRID(makepoint(num_x_coord , num_y_coord), 2264), 4326)) as latitude", "f.pid = '" + pid + "' limit 1", "json", "?");
+ $.getJSON(url, function(data) {
+ if (data.total_rows > 0) {
+ message = "<h5>Identfy</h5>" + data.rows[0].row.address + "<br />PID: " + data.rows[0].row.parcel_id;
+ message += "<br /><br /><strong><a href='javascript:void(0)' class='identify_select' data-matid='" + data.rows[0].row.objectid + "' onclick='locationFinder(\"Address\", \"master_address_table\", \"objectid\", " + data.rows[0].row.objectid + ");'>Select this Location</a></strong>";
+ $.publish("/layers/addmarker", [{
+ "lon": data.rows[0].row.longitude,
+ "lat": data.rows[0].row.latitude,
+ "featuretype": "1",
+ "label": message
+ }]);
+ }
+ });
+ }
});
}
});
@@ -387,7 +402,7 @@ function addMarker(data) {
// Add routing to infowindow if there's a selected record and it isn't an address itself.
if (data.featuretype !== 0 && selectedAddress.objectid) {
- data.label += '<br /><a href="javascript:void(0)" onclick="$(\'#routeTo\').val(\'' + data.lat + ',' + data.lon + '\'); $(\'#accordion-data\').accordion(\'activate\', \'#ROUTING\'); calcRoute();" >Route to This Location </a>';
+ data.label += '<br /><strong><a href="javascript:void(0)" onclick="$(\'#routeTo\').val(\'' + data.lat + ',' + data.lon + '\'); $(\'#accordion-data\').accordion(\'activate\', \'#ROUTING\'); calcRoute();" >Route to This Location </a></strong>';
}
// Create info window
@@ -416,12 +431,13 @@ function calcRoute() {
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
+ directionsDisplay.setMap(map);
$("#directionsPanel").empty();
directionsDisplay.setDirections(response);
}
else {
$("#directionsPanel").html("<h5>Route Not Found</h5>Google was unable to find one of the locations provided.");
- directionsDisplay.setDirections({routes: []});
+ directionsDisplay.setMap(map);
}
});
}
View
5 js/script.js
@@ -129,9 +129,8 @@ $(document).ready(function() {
calcRoute();
});
$("#routeClear").on("click", function() {
- directionsDisplay.setDirections({
- routes: []
- });
+ directionsDisplay.setMap(null);
+ $("#directionsPanel").empty();
});
$("#photo_gallery").on("click", "img", function(event) {
$(".house_photo").removeClass("house_photo_selected");
View
3 manifest.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# v23
+# v52
# Explicitly cached 'master entries'.
CACHE:
@@ -37,7 +37,6 @@ js/map.js
js/libs/modernizr.custom.js
https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js
-http://maps.googleapis.com/maps/api/js?v=3.9&sensor=false&libraries=geometry,panoramio,weather
# Everything else: go sponge somebody's wifi

0 comments on commit 9010efa

Please sign in to comment.
Something went wrong with that request. Please try again.