Jump to content


drilonb

Member Since 14 Apr 2011
Offline Last Active May 21 2013 05:02 PM
-----

#18338 Map Marker Fieldtype

Posted by drilonb on 12 October 2012 - 02:25 AM

I just like to add work code, if some one have a problem to make it work, after install the Module.


This code is for parent page when the city map or address will show all children inside map,

echo "\n\n<div id='map1'></div>"; //div to show in template map


$js = "<script type='text/javascript'>";

$js .= "RCDMap.options.zoom = 2;";
$js .= "RCDMap.init('map1', 0, 0);";
foreach($page->children as $items) {
	    $js .= "\nRCDMap.addMarker('{$items->title}', '{$items->url}', {$items->map->lat}, {$items->map->lng});";
}
$js .= "RCDMap.fitToMarkers();";

$js .= "</script>";
echo $js;


Here is code for a single page for city, hotels, or what ever u want to use it,


echo "<div id='map'></div>"; //div to show in template map

$js = "<script type='text/javascript'>";


$js .= "RCDMap.options.zoom = 10;";
$js .= "RCDMap.init('map', {$page->map->lat}, {$page->map->lng});";
$js .= "RCDMap.addMarker('{$page->title}', '', {$page->map->lat}, {$page->map->lng});";

$js .= "</script>";


echo $js;


CSS

#map {
width: 100%;
height: 300px;
margin: 1em 0;
}


#map1 {
width: 100%;
height: 500px;
margin: 1em 0;
}

JS

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<script type="text/javascript" src="http://www.di.net/almanac/site/templates/scripts/RCDMap.js"></script> /*this is from Ryan you can put it in your folder*/



Thanks to RYAN,


#17205 Form Builder - Now Available

Posted by drilonb on 20 September 2012 - 02:22 AM

Dear Process Wire (Ryan Cramer)

I was thrilled when I heard the news for this module!
Best of luck in your new modules. I hope this is just the start of many more successes to come.

Regards,

PS: now i am using this form with License :) its really easy to use and work with it,


#13309 A few sites

Posted by drilonb on 05 July 2012 - 01:19 PM

I am creazy in Almanac of Architecture & Design this site look tooo full with content i love it and i love processwire template on it

great work.


#13308 Apache w/virtualhosts where to install processwire?

Posted by drilonb on 05 July 2012 - 01:12 PM

Can you try something like this ...


for a CentOS server, I needed to change the AllowOverride setting in the file /etc/httpd/conf.d/virtualhosts.conf


httpd.conf before:

Options FollowSymLinks
AllowOverride None

httpd.conf after:

Options FollowSymLinks
AllowOverride All

PS, if you have a same trouble with httpd you can try tuxlite script shell to make it easy for you and your virtual hosts in feature !if you have a VPS or DEDICATED server ... i use it, all my processwire sites work great,


#10893 ProcessWire on LiteSpeed Web Server?

Posted by drilonb on 24 April 2012 - 08:07 AM

And i use LiteSpeed and i dont have any trouble with PW works perfect i use it till from 2011,

BR