PHP Classes

Bug fixes

Recommend this page to a friend!

      PHP Classes blog  >  Using PHP MySQL with ...  >  All threads  >  Bug fixes  >  (Un) Subscribe thread alerts  
Subject:Bug fixes
Summary:Here are 2 bug fixes for the display of polygons & edit area
Messages:4
Author:Steve Breese
Date:2015-05-28 16:30:54
Update:2016-03-22 17:31:36
 

  1. Bug fixes   Reply   Report abuse  
Picture of Steve Breese Steve Breese - 2015-05-28 18:36:26
To fix Edit Area page, open editarea.php and replace "resetStreet();" with "resetArea();"

To fix the display of areas/polygons on the index.php page, replace the addAreas() function with the following:

function addAreas() {
for(i=0; i < areas.length; i++) {
var AreaName = areas[i]['name'];
var polygon = L.polygon( stringToGeoPoints(areas[i]['geolocations']), { color: 'blue'}).addTo(map);
polygon.bindPopup( "<b>" + AreaName );
}
}

Here is my version of the app, complete with basic navigation:
roadracing.rocks/Map/

  2. Re: Bug fixes   Reply   Report abuse  
Picture of Ashraf Gheith Ashraf Gheith - 2015-05-29 17:01:31 - In reply to message 1 from Steve Breese
Thank you steve.

  3. Re: Bug fixes   Reply   Report abuse  
Picture of Kopke Porto Kopke Porto - 2015-08-22 19:26:07 - In reply to message 2 from Ashraf Gheith
Can I have your source code please?


Also does anyone have some tips how I could implement buttons to switch layers on and of?
(So I can have a button to just show results of items that have a certain value in the database: e.g. type=AA or only the results of type=BB and of course a button to show all.)

Thanks in advance.

  4. Re: Bug fixes   Reply   Report abuse  
Picture of Stefan Ivascu Stefan Ivascu - 2016-03-22 17:31:36 - In reply to message 1 from Steve Breese
Hello,

The addAreas function seem to only show the last polygon defined. Can you tell me how to show all them ? (I already checkec the json file and I have 3 sets of variables correctly defined).

Kr,
Stefan