Welcome Guest, Not a member yet? Register   Sign In
Google Maps API Version 3 Library
#21

[eluser]Andre_Palantir[/eluser]
Hello GK, your library was used by me in several projects and whenever u came to BRazil u give me a shout, you deserve a beer =)

But I got a question:
Can I put several addresses in a route when we use the AddDirection function? IF Yes, how?I tried with addMarkByAddress but with no success
#22

[eluser]darkhouse[/eluser]
I haven't tested out this library yet, actually I haven't even looked at the source code, but I do have a couple feature requests.

1. Custom info windows (http://gmaps-samples-v3.googlecode.com/s...ustom.html)
2. Cluster markers (http://www.appelsiini.net/2008/11/introd...oogle-maps)

Like I said, I haven't even looked at the source so I don't know how difficult it would be to get these features in there, but it would be very cool. I may end up adding some stuff myself, as I sort of need a cluster marker solution now. Is there a github repo I can fork?
#23

[eluser]predat0r[/eluser]
@darkhouse http://www.bradwedell.com/phpgooglemapap...apAPI.html
#24

[eluser]nyxynyx[/eluser]
1. After adding a marker using addMarkerByAddress() inside my controller, is there any function that I can call from within the controller to remove the marker? Because after adding directions to it, the marker from addMarkerByAddress() overlaps with the start/end marker in my case so I need to remove the initial marker.

2. I cannot seem to have the map display without calling addMarkerByAddress(), is that right?

3. How do I adjust the zindex of the markers?

4. Can I offset the position of the markers?

Seems like a great library, thanks!
#25

[eluser]jesboy[/eluser]
Fixed problem with hyperlinks.

change this script

marker.set("content", "'.$marker['infowindow_content'].'");

with

marker.set("content", "'.addslashes($marker['infowindow_content']).'");

I do no know if it fixes something elese, but this fix helped me.
#26

[eluser]kingstone16[/eluser]
Is it possible to disable map dragging ?
#27

[eluser]pelte[/eluser]
The attached file is missing Sad
#28

[eluser]Kasper570[/eluser]
I am on a shared server wich doesn't has file_get_contents() enabled.

Is there a way i can work around this function and use another that perhaps is enabled on this shared server?

exact error massage:
Quote:A PHP Error was encountered

Severity: Warning

Message: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration

Filename: libraries/GMap.php

Line Number: 2496

A PHP Error was encountered

Severity: Warning

Message: file_get_contents(http://maps.google.com/maps/api/geocode/json?sensor=false&address=42 Beanland Gardens, Wibsey, Bradford,UK) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found

Filename: libraries/GMap.php

Line Number: 2496

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: _coords

Filename: libraries/GMap.php

Line Number: 2457
#29

[eluser]Kasper570[/eluser]
to awnser my own question:

Get_file_contents() is commonly disabled for extern urls for security reasons.
in stead of get_file_contents() i used cURL...

In (libraries/)GMap.php on line 2494 (may not be exact, but its almost at the bottom)
replace
function name:
Code:
function fetchURL($url) {

       return file_get_contents($url);
}


replace with
Code:
function fetchURL($url) {

       // return file_get_contents($url);
        
        // jSON String for request
        $json_string = '[your json string here]';
        
        // Initializing curl
        $ch = curl_init( $url );
        
        // Configuring curl options
        $options = array(
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => array('Content-type: application/json') ,
        CURLOPT_POSTFIELDS => $json_string
        );
        
        // Setting curl options
        curl_setopt_array( $ch, $options );
        
        // Getting results
        $result =  curl_exec($ch); // Getting jSON result string
        return $result;
    }

that is all you need to do.
#30

[eluser]ShoeLace1291[/eluser]
So, I've tried to set up a map on my website, but the map doesn't want to load. Everything outputs correctly as far as HTML is concerned, but I get an error in my firefox developer console saying the following:

Quote:Timestamp: 9/24/2012 10:18:29 PM
Error: ReferenceError: onLoadmap is not defined
Source File: http://localhost/blahblahblah/index.php/maps
Line: 121

This is line 121:
Code:
[removed]debugger;window.onload=onLoadmap;[removed]

I believe the above JS is the printOnLoad method of the GMap class.




Theme © iAndrew 2016 - Forum software by © MyBB