Yii Framework Forum: [EXTENSION] jquery-gmap - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] jquery-gmap OO PHP interface to Google Maps with added functionality. Rate Topic: ***** 4 Votes

#41 User is offline   EdmYiiUser 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-October 11

Posted 09 April 2012 - 09:33 AM

View Postianaré, on 25 August 2011 - 01:50 PM, said:

Work on this has started but is not complete yet, will be done for the next release. For now you can still access this functionality through JS.


I saw a class EGmap3MarkerCluster.php. Can I use the cluster via this class? If so, can you post an example? Thx
0

#42 User is offline   jengtong 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 13-June 12

Posted 13 June 2012 - 11:23 AM

Just a quick comment:

1. Thank you so much for such a wonderful extension.

2. I don't know if only I have the problem, but I found a bug in gmap3.js and gmap3.min.js. There is an undefined variable k which should be i if following the code's logic. I don't know if this bug occurs in certain circumstance but just found out when I tried to use the marker class's capturePosition.
0

#43 User is offline   stummp 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-June 11

Posted 11 July 2012 - 01:51 AM

hi,
i have the problem that the page, in which i include a gmap, doesent load when the server has no connection to the internet.
0

#44 User is offline   msams 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 12-March 11

Posted 09 August 2012 - 03:39 PM

How can I use this extension with caching? When I add beginCache before calling EGmap3Widget, the renderMap() option never inserts the javacsript for the maps into the footer when cached. Thanks!
0

#45 User is offline   canreo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 21-July 09

Posted 04 December 2012 - 05:12 PM

Are there any plans to update this plugin to Gmap3 version 5? This version is substantially different from previous versions, so it may take a bit of work to port over to it without breaking compatibility.
0

#46 User is offline   pistonov 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 22-January 13

Posted 28 March 2013 - 01:03 AM

View Postianaré, on 24 August 2011 - 01:50 PM, said:

A new version has been pushed to github which provides preliminary support for this. Here is an example :

Yii::import('ext.jquery-gmap.*');

$gmap = new EGmap3Widget();
$gmap->setSize(600, 400);

// base options
$options = array(
	'zoom' => 12,
	'center' => array('41.850033', '-87.650052'),
	'mapTypeId' => EGmap3MapTypeId::ROADMAP,
	'mapTypeControlOptions' => array(
		'mapTypeIds' => array(EGmap3MapTypeId::ROADMAP, 'style1'),
	),
);
$gmap->setOptions($options);

$styledMap = new EGmap3StyledMap('style1', array('name' => 'style 1'));
$styledMap->addStyle(array(
	'featureType' => 'road.highway',
	'elementType' => 'geometry',
	'stylers' => array(array(
			'hue' => '#ff0022',
			'saturation' => 60,
			'lightness' => -20
		)
	)
));
$gmap->add($styledMap);

$gmap->renderMap();



How i can start custom style always? Not through button push.
0

#47 User is offline   naved 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 08-January 14

Posted 22 April 2014 - 08:13 AM

Thanks for this awesome extension.
I am using this extension for the first time in my project PYA. but here I am facing the zoom problem of map i.e I want to go to the details view of the map such that streets, houses etc but it doesn't go there.
Here is my code.


<style>
#EGMapContainer1 img{
max-width: none;
}
</style>



<?php
Yii::import('common.extensions.EGMap.*');
$gMap = new EGMap();
$gMap->width = '100%';
$gMap->setHeight(500);
$gMap->zoom = 2;

$mapTypeControlOptions = array(
'position' => EGMapControlPosition::TOP_RIGHT,
'style' => EGMap::MAPTYPECONTROL_STYLE_DROPDOWN_MENU,
'minZoom' => 2,
'maxZoom' => 24,
);
$zoomControlOptions = array(
'style' => EGMap::ZOOMCONTROL_STYLE_SMALL,
);
$gMap->zoomControl = true;
$gMap->panControl = true;
$gMap->scrollwheel = false;

$gMap->zoomControlOptions = $zoomControlOptions;

$gMap->mapTypeControlOptions = $mapTypeControlOptions;


$gMap->setCenter(33.6770364, 73.0203442); // lat and long of Islamabad


/* * ************************************************************************************************* */


// Create GMapInfoWindows
/* * ******************styling the info window******************** */

// var contentString =
// Create GMapInfoWindows
$info_box = new EGMapInfoBox('<div style="color:#fff;border: 1px solid black; margin-top: 8px; background: #000; padding: 5px;">' . CHtml::image(Yii::app()->baseUrl . '/media/projects/thumbnails/' . $data->cover_photo, $data->title, array('height' => 100, 'width' => 100)) . '<br>' . CHtml::link(CHtml::encode($data->title), $data->url) . '</div>');

// set the properties
$info_box->pixelOffset = new EGMapSize('0', '-140');
$info_box->maxWidth = 0;
$info_box->boxStyle = array(
'width' => '"150px"',
'height' => '"120px"',
'background' => '"url(http://google-maps-u...ples/tipbox.gif) no-repeat"'
);
$info_box->closeBoxMargin = '"10px 2px 2px 2px"';
$info_box->infoBoxClearance = new EGMapSize(1, 1);
$info_box->enableEventPropagation = '"floatPane"';





$marker = new EGMapMarker($data->latitude, $data->longitude, array('title' => $data->title, 'icon' => $icon));
$marker->addHtmlInfoBox($info_box);
$gMap->addMarker($marker);
}
// enabling marker clusterer just for fun
// to view it zoom-out the map
$gMap->enableMarkerClusterer(new EGMapMarkerClusterer());

$gMap->renderMap();
?>



How should I fix this problem ???

thanks in advance.
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users