Ticket #196 (closed Bug report: fixed)

Opened 14 years ago

Last modified 13 years ago

admin/hotspot_location_map.php bug fix

Reported by: taedoo@… Owned by:
Priority: normal Milestone:
Component: Auth server, Other Version:
Keywords: Cc:

Description

hotspot location map is old GMapAPI. I rewrite GMap2API's hotspot_location_map.php .

< is Newfile

is Oldfile

=================================================diff execute 66c66 < $html_headers = "<script src=\" http://maps.google.com/maps?file=api&amp;v=2&amp;&key=" . Server::getCurrentServer()->getGoogleAPIKey() . "\" type=\"text/javascript\"></script>"; ---

$html_headers = "<script src=\" http://maps.google.com/maps?file=api&v=1&key=" . Server::getCurrentServer()->getGoogleAPIKey() . "\" type=\"text/javascript\"></script>";

75c75 < if($node->getGisLocation()->getLatitude() != null && $node->getGisLocation()->getLongitude() != null) ---

if($node->getGisLocation() !== null)

82,84c82,83 < $gis_point = $node->getNetwork()->getGisLocation(); < $lat = $gis_point->getLatitude(); < $long = $gis_point->getLongitude(); ---

$lat = "null"; $long = "null";

89c88 < $script .= "var map = new GMap2(document.getElementById(\"map_frame\"));\n"; ---

$script .= "var map = new GMap(document.getElementById(\"map_frame\"));\n";

92,93c91,93 < $script .= "map.setCenter(new GLatLng($lat, $long), 10);\n"; < $script .= "var current_marker_point = new GLatLng($lat, $long);\n"; ---

$script .= "map.setMapType(" . $node->getNetwork()->getGisMapType() . ");\n"; $script .= "map.centerAndZoom(new GPoint($long, $lat), 1);\n"; $script .= "var current_marker_point = new GPoint($long, $lat);\n";

112,113d111 < $script .= "map.setMapType(" . $node->getNetwork()->getGisMapType() . ");\n"; < $script .= "map.redraw();\n"; ==============================================================

Change History

Changed 14 years ago by taedoo@…

Oh It's mistakes.

============================================================

66c66

< $html_headers = "<script src=\" http://maps.google.com/maps?file=api&amp;v=2&amp;&key=" . Server::getCurrentServer()->getGoogleAPIKey() . "\" type=\"text/javascript\"></script>";

---

$html_headers = "<script src=\" http://maps.google.com/maps?file=api&v=1&key=" . Server::getCurrentServer()->getGoogleAPIKey() . "\" type=\"text/javascript\"></script>";

75c75

< if($node->getGisLocation()->getLatitude() != null && $node->getGisLocation()->getLongitude() != null)

---

if($node->getGisLocation() !== null)

82,84c82,83

< $gis_point = $node->getNetwork()->getGisLocation();

< $lat = $gis_point->getLatitude();

< $long = $gis_point->getLongitude();

---

$lat = "null";

$long = "null";

89c88

< $script .= "var map = new GMap2(document.getElementById(\"map_frame\"));\n";

---

$script .= "var map = new GMap(document.getElementById(\"map_frame\"));\n";

92,93c91,93

< $script .= "map.setCenter(new GLatLng($lat, $long), 15);\n";

< $script .= "var current_marker_point = new GLatLng($lat, $long);\n";

---

$script .= "map.setMapType(" . $node->getNetwork()->getGisMapType() . ");\n";

$script .= "map.centerAndZoom(new GPoint($long, $lat), 1);\n";

$script .= "var current_marker_point = new GPoint($long, $lat);\n";

112,113d111

< $script .= "map.setMapType(" . $node->getNetwork()->getGisMapType() . ");\n";

< $script .= "map.redraw();\n";

============================================================

Changed 14 years ago by fproulx

  • status changed from new to closed
  • resolution set to fixed

This has already been fixed about 2 months ago ! I modified the code to use version 2. Simply update your code to the latest SVN

Changed 14 years ago by taedoo@…

Oh?

I think, we can check the latest source code in [BROWSE SOURCE]menu.

But http://dev.wifidog.org/browser/trunk/wifidog-auth/wifidog/admin/hotspot_location_map.php is Not changing to GMap version 2.

Why it is?

Changed 13 years ago by benoitg

  • component changed from Auth server: Authentication to Auth server, Other
Note: See TracTickets for help on using tickets.