Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
ec39c5fc
Commit
ec39c5fc
authored
13 years ago
by
alvaro
Browse files
Options
Downloads
Patches
Plain Diff
Modified Googlemaps filter
parent
8f1ba19d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Haanga/lib/Haanga/Extension/Filter/Googlemaps.php
+14
-17
14 additions, 17 deletions
lib/Haanga/lib/Haanga/Extension/Filter/Googlemaps.php
with
14 additions
and
17 deletions
lib/Haanga/lib/Haanga/Extension/Filter/Googlemaps.php
+
14
−
17
View file @
ec39c5fc
<?php
class
Haanga_Extension_Filter_Google
M
aps
{
class
Haanga_Extension_Filter_Google
m
aps
{
public
$is_safe
=
TRUE
;
static
function
main
(
$obj
,
$varname
){
$data
=
""
;
...
...
@@ -43,7 +43,7 @@ class Haanga_Extension_Filter_GoogleMaps{
$east
=
$k
->
$names
[
1
]
->
value
;
}
$nameArr
.
=
$k
->
$names
[
2
]
->
value
;
$nameArr
.
=
'"'
.
$k
->
$names
[
2
]
->
value
.
'"'
;
$firstColumn
=
false
;
}
...
...
@@ -72,21 +72,18 @@ class Haanga_Extension_Filter_GoogleMaps{
var latArray = ["
.
$latArr
.
"];
var lonArray = ["
.
$longArr
.
"];
var labelArray = ["
.
$nameArr
.
"];
for (var i = 0; i < latArray.length; i++) {
var position = new google.maps.LatLng(latArray[i], lonArray[i]);
var marker = new google.maps.Marker({
position: position,
map: map
});
marker.setTitle(labelArray[i]);
var infowindow = new google.maps.InfoWindow({
content: labelArray[i]
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(marker.get('map'), marker);
});
var marker = new Array();
for (var i = 0; i < labelArray.length; i++) {
var position = new google.maps.LatLng(latArray[i], lonArray[i]);
marker = new google.maps.Marker({position: position,map: map});
marker.setTitle(labelArray[i]);
var infowindow = new google.maps.InfoWindow({content: i+labelArray[i]});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(labelArray[i]);
infowindow.open(map, marker);
}
})(marker, i));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment