When I start the geobrowser, the starting node page that is on top of the map says this:

An error occurred while loading http:?q=node/123:
No hostname specified.

(1) The correct form is not ?q=node/123, but node/123, for most installations.
(2) The host name is not being picked up.

Thank you for the great module.

Comments

psi-borg’s picture

i get an "alert" : "the URL is not valid and cannot be loaded"

the title shows up in the right top corner and a big blank box in the center...

http://www.localfooddirectory.ca/foodshed/geobrowser sure looks awesome! how much custom coding was required to get the menu mouseover info loaded into the overlays? any chance that big rectangle in the center can be loaded in an area like the layers menu on the right?

emersonlenon’s picture

Title: No Host Name Specified » Same errors

I also get the URL is not valid alert.
When I click OK to that another pops up:
"Permission denied to call method XMLDocument.load"

I'd love to get this module working, but it seems to be malfunctioning.
I think it must have been custom coded for local food directory. No matter what I do the page title is set to "Local Food Directory".

I also like some better documentation for this module.
Thanks

saint65’s picture

In browser.php line 127 I removed the slash in

<?php print(base_path().'/?q='.variable_get(geobrowser_initial_page,'')); ?>

which gives

<?php print(base_path().'?q='.variable_get(geobrowser_initial_page,'')); ?>

Then around line 232 I did the same:

function node_clicked(marker){
     document.getElementById('info_frame').src = base_path + "/?q=node" + marker.nid;

to change to:

function node_clicked(marker){
         document.getElementById('info_frame').src = base_path + "?q=node" + marker.nid;

then around line 272

 var url_to_open = base_path + "/?q=geobrowser_xml_controller&function=map_node" 

to

var url_to_open = base_path + "?q=geobrowser_xml_controller&function=map_node" 

then around 232

 tree[i].loadXML(base_path + "/?q=geobrowser_xml_controller&function=build_tree&vid="

to

tree[i].loadXML(base_path + "?q=geobrowser_xml_controller&function=build_tree&vid="

If anyone has a better technique, greatly appreciated.

phayes’s picture

Assigned: Unassigned » phayes
Priority: Normal » Critical
phayes’s picture

Sorry about this bug guys..

It should have been taken care of at first post.

phayes’s picture

Status: Active » Fixed
emersonlenon’s picture

Priority: Critical » Normal
Status: Fixed » Postponed (maintainer needs more info)

Modifying the code of browser.php as indicated above resulted in better display.
Now the tree displays my vocab and terms as defined in taxonomy.
However the custom icons I uploaded in the taxonomy_image module do not load.
by clicking the tree where they should be I can display the box with the broken link icon in it.
If i right click where the images should be and select view image it takes me to this page:
http://www.weblog.com/iconCheckAll.gif (for the checkboxes)
and
http://www.weblog.com/category_pictures/city_icon_2_0.png (for the icon)

Needless to say they also don't load on the map.

To see my problem in action go to:

http://www.thisintersectionsucks.info/geobrowser

I can't find in the code where the path to the images are defined. Any help?

saint65’s picture

You will need to give anonymous access to see your page, the page gives access denied message for now. Might i suggest that you look at http://drupal.org/node/188278#comment-630446 to see if this is similar to your problem.

goodluck and post your result

emersonlenon’s picture

I'm not sure why that page gives access denied.
If I go into the access control settings and check every single box it still returns that error for every user account except #1
!!!!!

saint65’s picture

I had a similar issue on my test lan, and for some reason had to hack a solution.
I tried installing nodeaccess to give permission to the individual node, this did not change anything for geobrowser, i then tried /home/administer/content management/post settings and hit the rebuild permissions button- this didn't work either. I then tried to clear my cache,and this didn't work, so then i went into geobrowser.module and found at line 240 the access rights

   240   $items[] = array(
    241     'path' => 'geobrowser',
    242     'title' => t('Geobrowser'),
    243     'callback' => 'geobrowser_display_map',
    244     'access' => user_access('access geobrowser content'),
    245     'type' => MENU_NORMAL_ITEM
    246   );
    247
    248    $items[] = array(
    249     'path' => 'geobrowser_xml_controller',
    250     'title' => t('Geobrowser XML Controller'),
    251     'callback' => 'geobrowser_xml_controller',
    252     'access' => user_access('access geobrowser content'),
    253     'type' => MENU_CALLBACK
    254 );

and changed it to:

   240   $items[] = array(
    241     'path' => 'geobrowser',
    242     'title' => t('Geobrowser'),
    243     'callback' => 'geobrowser_display_map',
    244 //    'access' => user_access('access geobrowser content'),
    245         'access' => TRUE,
    246     'type' => MENU_NORMAL_ITEM
    247   );
    248
    249    $items[] = array(
    250     'path' => 'geobrowser_xml_controller',
    251     'title' => t('Geobrowser XML Controller'),
    252     'callback' => 'geobrowser_xml_controller',
    253 //    'access' => user_access('access geobrowser content'),
    254         'access' => TRUE,
    255     'type' => MENU_CALLBACK
    256 );

the above code has line numbers for clarity only the actual code should look like:

      $items[] = array(
        'path' => 'geobrowser',
        'title' => t('Geobrowser'),
        'callback' => 'geobrowser_display_map',
    //    'access' => user_access('access geobrowser content'),
            'access' => TRUE,
        'type' => MENU_NORMAL_ITEM
      );
   
       $items[] = array(
        'path' => 'geobrowser_xml_controller',
       'title' => t('Geobrowser XML Controller'),
       'callback' => 'geobrowser_xml_controller',
   //    'access' => user_access('access geobrowser content'),
           'access' => TRUE,
       'type' => MENU_CALLBACK
    );

I know it is not a glamorous solution but I checked that it was not giving false access rights and it seems to work when logged out fine.

Simon.

emersonlenon’s picture

Ok so I finally got all your code hacks implemented and working.

You should be able to view it fine now as an anonymous user:

http://www.thisintersectionsucks.com

I have a few more questions about how to get certain things to work.

1) Is there a way to view certain types of icons at one zoom level and only reveal others at a higher zoom? For example at my site, on a view of the entire country could you see only the icons representing a city and then reveal the intersections when you zoom in on one city?

2) What would be the best way to perform a recenter and zoom? For example if I had a list of cities (location enabled nodes) could I generate a list of links that would recenter and zoom the main map?

emersonlenon’s picture

Category: bug » feature

Ok so I finally got all your code hacks implemented and working.

You should be able to view it fine now as an anonymous user:

http://www.thisintersectionsucks.com

I have a few more questions about how to get certain things to work.

1) Is there a way to view certain types of icons at one zoom level and only reveal others at a higher zoom? For example at my site, on a view of the entire country could you see only the icons representing a city and then reveal the intersections when you zoom in on one city?

2) What would be the best way to perform a recenter and zoom? For example if I had a list of cities (location enabled nodes) could I generate a list of links that would recenter and zoom the main map?

phayes’s picture

Okay, i've fixed the access permissions. You should now be able to set "Access geobrowser" under "access control" and it should work properly. I'll commit later today.

1) Is there a way to view certain types of icons at one zoom level and only reveal others at a higher zoom? For example at my site, on a view of the entire country could you see only the icons representing a city and then reveal the intersections when you zoom in on one city?

No, not at the moment. My suggestion for implementing this: A special node type called "geobrowser jump" or something like that that you specify at what zoom levels it's viewable, and where it jumps to when you click it. This will require some serious coding, but if you build it I will incorporate it into the module. (I dont have the time to do this)

2) What would be the best way to perform a recenter and zoom? For example if I had a list of cities (location enabled nodes) could I generate a list of links that would recenter and zoom the main map?

Yes. You need to call the following javascript: map.setCenter(new GLatLng( lat, lon), zoom);

if you wanted to call it from within the info window I *think* it would be parent.map.setCenter(new GLatLng( lat, lon), zoom); - however, double check on cross-frame scripting to be sure.

Hope that helps!

saint65’s picture

Just a note on looping your site, you need to do something about your "home" link, might i suggest that you disable your redirection &/or put the HOME link in the map window, I am not sure on the best way to force the user to see http://site/geobrowser but you don't want to have a geobrowser in a geobrowser in a geobrowser view. Make sure that you break out of your info window
put this into your additional html on the geobrowser module page

<a href="#" style="text-decoration:none;" onClick="document.getElementById('info_frame').src = 'index.php'; showdiv('info_window'); ">Home</a>

and remove "home" reference from the pages in the info window.

Great site concept, wish I had thought of that.

Simon.

phayes’s picture

Status: Postponed (maintainer needs more info) » Fixed

I believe the initial issue that opened this discussion has been resolved so i'm marking this thread as fixed.

Feel free to post a new issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.