Antonio Ramirez, on 06 January 2011 - 11:37 AM, said:
Of course
Posted 10 January 2011 - 09:43 AM
Posted 10 January 2011 - 01:48 PM
Yii::import('ext.gmaps.*');
$gMap = new EGMap();
$gMap->setZoom(13);
$gMap->setCenter(39.721089311812094, 2.91165944519042);
// Create GMapInfoWindow
$info_window = new EGMapInfoWindow('<div>I was living here as a kid!</div>');
// Create marker
$marker = new EGMapMarker(39.721089311812094, 2.91165944519042, array('title' => '"My Town"','icon'=>'"http://google-maps-icons.googlecode.com/files/gazstation.png"'));
$marker->addHtmlInfoWindow($info_window);
$gMap->addMarker($marker);
$gMap->renderMap();
Yii::import('ext.gmaps.*');
$gMap = new EGMap();
$gMap->setZoom(13);
$gMap->setCenter(39.721089311812094, 2.91165944519042);
// Create GMapInfoWindow
$info_window = new EGMapInfoWindow('<div>I was living here as a kid!</div>');
// Creating new Image for a custom Icon -google maps v3
$icon = new EGMapMarkerImage("http://google-maps-icons.googlecode.com/files/gazstation.png");
$icon->setSize(32, 37);
// Create marker
$marker = new EGMapMarker(39.721089311812094, 2.91165944519042,
array('title' => '"My Town"',
'icon'=>$icon)); // icon
$marker->addHtmlInfoWindow($info_window);
$gMap->addMarker($marker);
$gMap->renderMap();
This post has been edited by Antonio Ramirez: 10 January 2011 - 02:55 PM
Posted 10 January 2011 - 01:52 PM
This post has been edited by Antonio Ramirez: 10 January 2011 - 02:55 PM
Posted 11 January 2011 - 08:48 AM
Antonio Ramirez, on 10 January 2011 - 01:48 PM, said:
Yii::import('ext.gmaps.*');
$gMap = new EGMap();
$gMap->setZoom(13);
$gMap->setCenter(39.721089311812094, 2.91165944519042);
// Create GMapInfoWindow
$info_window = new EGMapInfoWindow('<div>I was living here as a kid!</div>');
// Create marker
$marker = new EGMapMarker(39.721089311812094, 2.91165944519042, array('title' => '"My Town"','icon'=>'"http://google-maps-icons.googlecode.com/files/gazstation.png"'));
$marker->addHtmlInfoWindow($info_window);
$gMap->addMarker($marker);
$gMap->renderMap();
Yii::import('ext.gmaps.*');
$gMap = new EGMap();
$gMap->setZoom(13);
$gMap->setCenter(39.721089311812094, 2.91165944519042);
// Create GMapInfoWindow
$info_window = new EGMapInfoWindow('<div>I was living here as a kid!</div>');
// Creating new Image for a custom Icon -google maps v3
$icon = new EGMapMarkerImage("http://google-maps-icons.googlecode.com/files/gazstation.png");
$icon->setSize(32, 37);
// Create marker
$marker = new EGMapMarker(39.721089311812094, 2.91165944519042,
array('title' => '"My Town"',
'icon'=>$icon)); // icon
$marker->addHtmlInfoWindow($info_window);
$gMap->addMarker($marker);
$gMap->renderMap();
Posted 11 January 2011 - 09:12 AM
This post has been edited by Antonio Ramirez: 11 January 2011 - 09:32 AM
Posted 11 January 2011 - 09:33 AM
Antonio Ramirez, on 10 January 2011 - 01:52 PM, said:
google.maps.Map.prototype.markers = new Array();
google.maps.Map.prototype.getMarkers = function() {
return this.markers;
};
google.maps.Map.prototype.clearMarkers = function() {
if (infowindow)
infowindow.close();
for(var i=0; i<this.markers.length; i++)
{
this.markers[i].setMap(null);
}
this.markers = new Array();
};
google.maps.Marker.prototype._setMap = google.maps.Marker.prototype.setMap;
google.maps.Marker.prototype.setMap = function(map) {
if (map)
{
map.markers[map.markers.length] = this;
}
this._setMap(map);
}
$this->addGlobalVariable('infowindow','null');
$this->addEvent(new EGMapEvent('click','if (infowindow) infowindow.close(); infowindow = '.$this->info_window->getName().'; '.$this->info_window->getName().".open(".$map_js_name.",".$this->getName().");"));
Posted 11 January 2011 - 10:15 AM
bitmatix, on 11 January 2011 - 09:33 AM, said:
google.maps.Map.prototype.markers = new Array();
google.maps.Map.prototype.getMarkers = function() {
return this.markers;
};
google.maps.Map.prototype.clearMarkers = function() {
if (infowindow)
infowindow.close();
for(var i=0; i<this.markers.length; i++)
{
this.markers[i].setMap(null);
}
this.markers = new Array();
};
google.maps.Marker.prototype._setMap = google.maps.Marker.prototype.setMap;
google.maps.Marker.prototype.setMap = function(map) {
if (map)
{
map.markers[map.markers.length] = this;
}
this._setMap(map);
}
$this->addGlobalVariable('infowindow','null');
$this->addEvent(new EGMapEvent('click','if (infowindow) infowindow.close(); infowindow = '.$this->info_window->getName().'; '.$this->info_window->getName().".open(".$map_js_name.",".$this->getName().");"));
Posted 11 January 2011 - 10:20 AM
Antonio Ramirez, on 11 January 2011 - 10:15 AM, said:
info_window6 = new google.maps.InfoWindow({
content: "Tauentzienstrasse 19/19a<br />10789 Berlin"
});
var marker6 = new google.maps.Marker({
map: map4d2c77428dfdc,
position: new google.maps.LatLng(52.502562, 13.339489),
});
google.maps.event.addListener(marker6, "click", function() {if (infowindow) infowindow.close(); infowindow = info_window6; info_window6.open(map4d2c77428dfdc,marker6);});
info_window7 = new google.maps.InfoWindow({
content: "Test 123<br />12345 Berlin"
});
var marker7 = new google.maps.Marker({
map: map4d2c769f137f0,
position: new google.maps.LatLng(52.4517345, 13.3151777),
});
google.maps.event.addListener(marker7, "click", function() {if (infowindow) infowindow.close(); infowindow = info_window7; info_window7.open(map4d2c769f137f0,marker7);});
Posted 11 January 2011 - 11:14 AM
Posted 11 January 2011 - 11:52 AM
bitmatix, on 11 January 2011 - 10:20 AM, said:
info_window6 = new google.maps.InfoWindow({
content: "Tauentzienstrasse 19/19a<br />10789 Berlin"
});
var marker6 = new google.maps.Marker({
map: map4d2c77428dfdc,
position: new google.maps.LatLng(52.502562, 13.339489),
});
google.maps.event.addListener(marker6, "click", function() {if (infowindow) infowindow.close(); infowindow = info_window6; info_window6.open(map4d2c77428dfdc,marker6);});
info_window7 = new google.maps.InfoWindow({
content: "Test 123<br />12345 Berlin"
});
var marker7 = new google.maps.Marker({
map: map4d2c769f137f0,
position: new google.maps.LatLng(52.4517345, 13.3151777),
});
google.maps.event.addListener(marker7, "click", function() {if (infowindow) infowindow.close(); infowindow = info_window7; info_window7.open(map4d2c769f137f0,marker7);});
Posted 12 January 2011 - 09:32 AM
Antonio Ramirez, on 11 January 2011 - 11:52 AM, said:
Posted 12 January 2011 - 09:43 AM
Khan, on 12 January 2011 - 09:32 AM, said:
<a href="#" onclick="info_window1.open(map1,marker1); return false;">Map it</a> <a href="#" onclick="info_window2.open(map1,marker2); return false;">Map it</a> <a href="#" onclick="info_window3.open(map1,marker3); return false;">Map it</a>
<a href="#" onclick="info_window1.open(map1,map1.markers[0]); return false;">Map it</a> <a href="#" onclick="info_window2.open(map1,map1.markers[1]); return false;">Map it</a> <a href="#" onclick="info_window3.open(map1,map1.markers[2]); return false;">Map it</a>
Posted 12 January 2011 - 09:58 AM
Posted 13 January 2011 - 07:51 AM
<?php
Yii::import('ext.gmaps.*');
$gMap = new EGMap();
$gMap->setWidth(625);
$gMap->setHeight(400);
$gMap->setZoom(10);
foreach($deals as $post):
$sample_address = $post->red_address ." ".$post->red_city ." ".$post->red_state ." ". $post->red_zip ." ". $post->red_cont_code ;
$geocoded_address = new EGMapGeocodedAddress($sample_address);
$geocoded_address->geocode($gMap->getGMapClient());
// Create GMapInfoWindow
$info_window = new EGMapInfoWindow('<br /><div><strong>'.$post->title.'</strong></div><br />Location :'.$sample_address.'<br /> <br /><a href=/deals/view?id=' .$post->id .'><img src=' .$baseUrl.'/static/images/systemimages/vdtls.png></a><br /> <br />');
$gMap->setCenter($geocoded_address->getLat(), $geocoded_address->getLng());
// Create new marker
$marker = new EGMapMarker($geocoded_address->getLat(), $geocoded_address->getLng(),
array('title' => '"'.$post->title.'"'));
// 'icon'=>$icon)); // icon
$marker->addHtmlInfoWindow($info_window);
$gMap->addMarker($marker);
?>
<h3> <a href="/deals/view?id=<?php echo $post->id; ?>" title="<?php echo $post->title ;?>"><?php echo $post->title ;?></a></h3>
<a href="#" onclick="info_window.open(gMap,gMap.markers[2]); return false;">Map it</a>
<?php endforeach;
$gMap->appendMapTo('#map2_container');
$gMap->renderMap();?>
Posted 13 January 2011 - 08:24 AM
Posted 22 January 2011 - 02:54 PM
Captura de pantalla 2011-01-23 a las 13.24.21.jpg (67.52K)
Captura de pantalla 2011-01-22 a las 20.51.23.jpg (92.45K)
Captura de pantalla 2011-01-23 a las 22.08.08.jpg (103.37K)
Posted 24 January 2011 - 07:00 AM
Posted 24 January 2011 - 09:15 PM
Captura de pantalla 2011-01-25 a las 03.18.58.png (279.95K)
Posted 25 January 2011 - 02:43 PM