EGMap 2.0 has been uploaded. Please, be informed that this new version has not BC for the sake of better code. Its code has been very much reduced. Still lot of work to do but the base has been created.
Hope you enjoy it
[center][/center]
Bug reports, suggestions, examples in this forum post.
Included support for addDOMEventListenerOnce and addEventListenerOnce (thanks Johnatan)
03-02-2011
Fixed small bug on the registerPlugins Functions (thanks Rangel Reale)
03-02-2011 version 1.0.0
Code completely re-written
KML Support
KML Libraries included
Most of the libraries now extend from EGMapBase
Magic getters and setters for methods preceded by set or get (Yii style) and for its options array
Better Clusterer Support
Inclusion of new plugins
Previous Versions not compatible with this one
24-01-2011 version 1.8
Added MapType Controls Styles and Positioning
Fixed minor bugs throughout all the library classes
Included EGMapPoint and EGMapSize classes to the library
Code cleaning, improved code algorithms
Included EGMapKeyDragZoom class to allow ‘shift-click-and-drag’ option
Included EGMapControlPosition Class, now we can easily set controls on different positions on the map - Included EGMapMarkerWithLabel class to allow markers with labels
Included EGMapMarkerClusterer class to support marker clusterer feature
Fixed common sharing info window option. Now users can choose whether to share a common info window variable or not
Improved options encode. Included modified version of CJavaScript::encode to properly render Google Maps options.
11-01-2011 version 1.7
Bug Fix EGMarkerImage class
Added Support for Global Info Window Reference. Now, only one info window is open at all times. (Thanks bitmatix)
10-01-2011 version 1.6
Removed EGMapIcon class (deprecated for Google Maps v3)
Modified - Added setIcon, getIcon, setShadow, getShadow functions to EGMapMarker class
Removed deprecated functions and references on EGMap class
06-01-2011 version 1.5
Removed global_variables dependency
Fixed minor javascript bug for global variables
Fixed minor naming rendering bugs (jsName)
Included possibility to change jsName
24-12-2010 version 1.4
Fixed marker reference when rendering multiple maps
Fixed directions reference when rendering multiple maps
Fixed global variables registration bug - Fixed minor rendered javascript bugs
Fixed rendering container bug THANKS MDOMBA (Yii support really rocks!)
Added appendTo function to add maps to a container ID in the page
If no appendTo JQuery ID is set, Maps will be appended to document
Removed initialization function name dependency. Now the function is related to Map Ids.
I inserted the given example code to the view ( I think that was to be done) and found that till the google maps do not respond the page shows nothing, then suddenly the whole page shows up and maps starts to load. I encounter this while testing the pages on the slow network. As a solution to this I put up the egmap example code in a different view and called it via AJAX,
with renderPartial(‘map’) in controller I have :
<div id="egmap_0" style="width:512px;height:512px;" /> as response, as per FireBUG.
With renderPartial(‘map’,NULL,FALSE,TRUE) in controller I have :
A blank Page(even the calling page content blanks out)with FireBUG showing
Please, re-downloaded files, I had a couple of bugs within two functions.
As Gustavo said, Google works that way. nevertheless, try a different approach as I am trying to find out the best way to use a lazy programmers function that actually renders two or three or four maps ()
write the HTML layer on the partial view file: <div id="my_custom_map" style="width:100%;height:300px"></div> (for example)
Then when you start the code, set the containers id: $myEGMap->setContainerId(‘my_custom_map’)
and render the script: $myEGMap->renderScriptMap();
I just downloaded the latest update… and like the previous one it has one more thing that needs fixing…
With your example #3 If you click on the marker on the first map… the info "I was living here as a kid" opens in the second map instead on the first one…
If you click the marker on the second map… it does nothing…
End the example 1 and 2 does not work anymore… I have the webLogRute enabled… and the map appears at the very bottom of the page after the webLogRoute application log…
// we can now render to any containers in the document, we control where
// we want it to be rendered now without coding the HTML elements for the
// Google map
// If we do not specify the container, the map will be appended to the BODY
// tag of the document
I have successfully inserted 5 maps on the page by using the examples provided, with and without appendTo tags. If you do not specify containers will be appended to the BODY. (Check internal code my friend, you are more than qualified to tell me what you see there )
One way to control position too is by getting the container:
$div = $gMap->getContainer();
Registering the scripts
$gMap->registerMapScript();
Echo container, wherever you want it
echo $div;
If you wish to add another one, you need to create or recreate a new EGMap Class.
I understand the appendTo… just wanted to tell you that the call like example 1 and 2 is not usefull as it adds the map to the very end of the page…
I liked more the first idea… to render a div at the place where the extension gets called… isn’t it more intuitive?
Edit: and maybe instead of appendTo… you can add a variable for the container ID to the constructor of EGMap… so that you can have both options… just a thought to simplify this…
Hello! I’m new to yii and installed your really great extension. Now I want to modify this extension - I want to add the ability to draw lines, rectangles, circles on a google map.
I was wondering which google maps api version is supported by this extension?