This topic is locked

Google Map features

1/10/2010 3:37:46 PM
PHPRunner General questions
C
copper21 author

Hello all,
I am extremely interested in the Google maps feature in PHPR 5.2 and was wondering if there is a way to geocode the coordinates on the map. What I mean is without knowing the lat/lon of of the location, is there a way to simply type an address, (eg, house number, street name, city, state) and get the maker to be placed on the map that way? I am then looking on how to have a map placed in the header, just like the demo page, with all of the results on the "list" page. Any help would be appreciated. Thanks in adavance.
Brian

Admin 1/10/2010

Brian,
sure, it supports both addresses and lat/lon pairs. Set any field 'View as' type as 'Map' and choose address field in Address dropdown box.

C
copper21 author 1/10/2010

Sergey,
Thank you for the quick response. Now I have gotten the map to display on the "list" page just fine, and I just have a couple more questions.

  1. Is there a way to set the zoom on the map so that it displays closer to the street level so that I can see the street names versus the map showing the region? I am looking for the results of the list page to be more like your demo page of the google map feature.
  2. I was also wondering if there was a way to insert data from multiple fields into one field on the same table. I have field names: House Number, Direction, Street Name, City, State, and Map on a table. I would like to take the data from House Number, Direction, Street Name, City, State and then insert it into Map so that it would read like a full address to use with the "google map" feature. The reason why I have separated House Number, Direction, Street Name, City, State is to make for an easier search feature.
  3. Also I am looking to place all of the listed or searched addresses onto one map, like you did with the header example on the demo page; is there a "map" setting for that? Thanks again, you have been extremely helpful.
    Brian

K
kjp 1/12/2010

bonjour Sergey
You said

"it supports both addresses and lat/lon pairs"

I think it supports only US addresses?

Unable to use French's.
another post on GMaps
PS My phpr52's key is out for 3 days...

J
Jane 1/12/2010

Hi,
could you publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages where I can see and troubleshoot this problem?
Regarding PHPRunner key.

I recommend you to contact support@xlinesoft.com directly.

Admin 1/12/2010

Brian,

  1. zoom feature is kind of automatic. On live demo we didn't set any zoom options. Google picks some default zoom value.
  2. You need to combine those values into one calculated address field in SQL query i.e.
    select ...

    concat(House Number, ' ',Street Name,',',City,' ',State) as fulladdress

    from ...
    Then set 'View as' type of fulladdress field to Map.
  3. In Visual Editor right-click anywhere and choose Insert->Google Map. Then specify field that holds address values and you are good to go.

W
wrjost 1/12/2010

Hi,

just found this reference with an example:
The example below requests two maps of Manhattan at the same center value but at zoom levels 12 and 14, respectively:
http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400\&key=MAPS_API_KEY&sensor=false

http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=14&size=400x400&key=MAPS_API_KEY&sensor=false
Can you incorporate that variable somehow into your marvelous widget and then pass it on to GMaps?
Thank you and greetings,

Wilfried

Admin 1/12/2010

Wilfried,
thank you, we'll take a look at this.

C
copper21 author 1/12/2010



Brian,

  1. zoom feature is kind of automatic. On live demo we didn't set any zoom options. Google picks some default zoom value.
  2. You need to combine those values into one calculated address field in SQL query i.e.
    select ...

    concat(House Number, ' ',Street Name,',',City,' ',State) as fulladdress

    from ...
    Then set 'View as' type of fulladdress field to Map.
  3. In Visual Editor right-click anywhere and choose Insert->Google Map. Then specify field that holds address values and you are good to go.


Sergey,
Again...thanks for your help. You guys are great!

C
copper21 author 1/12/2010

Sergey,
I want to thank you and Jane for all of the help you have given to me with the projects that I needed help with. I hope that I may help you now. I have found a setting in the "gmap" javascript file that will allow you to set the "zoom" on the map. The file is located in \output\include\runnerJS\ and I opended it with word pad. About 25 lines down you will see "..... cenLng/markers.length)),5);},initMarkers:function(mapDataObj){var ....." The number "5" represents the zoom on the map and can be changed. The smaller the number, i.e. 1, the further away you get, and the larger the number, i.e. 10, the closer you get to the "street level". The only drawback to that setting is that everytime you build the project, the setting changes back to "5"; so when you have completed your project, change the file and it should be good to go. Hope that this may help in some way.
Also, one more thing. How would I go about adding a description to the marker on the map. For example, when I mouse over a marker, I would like it to state some text of a description or something like that.
Brian

R
ringlis1 1/13/2010

I was going to post something about the zoon level. I agree that this would be a good benefit. I think there should be two options available.

  1. Set the Zoom Level in the properties
  2. Allow to the Map to zoom out just enough to show all markers (if more than 1 marker is used)

K
kjp 1/17/2010

Bonjour,
Brian, Fine your answer to increase the zoom'ratio.

JetskiBum's request is a good way

  1. Set the Zoom Level in the properties
  2. Allow to the Map to zoom out just enough to show all markers (if more than 1 marker is used)
    Just now, the "general gmap" ( mean one map with markers for all the records in your database)

    has the same ratio as the zomm in the record "view list".
    The marker's png is load from te website: (firebug info)

    src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=46943&image=1&table=forumreplies"; usemap="#gmimap21"/>

    A possibility to load our own?

    and perhaps to assign one marker's png to a category...

    I mean: I want to display on the same map about 50 records but 4 different "colors markers".
    A possibility to assign a "title" (concatenation of "City+state"?)

    and to display that on the marker's when mouseover
    A "little" bug?

    I also got a "phpr display's hang" on my project'test:

    a genaral maps of all records (nothing else on the list view)

    and an a "view page" / records.

    I spend ... A long time to spot why the list view hang...

    Perhaps to let the view going on with an error message?

    my location is "France" and we have cities with a name like:

    "Saint Denis de [size="4"]l'H[/size]otel"

    The gmaps widget hangs with this kind of data (the[size="4"] '[/size])

    (ONLY on the "concatenation" maps, not on individual's
    On this test, I assign in the "address field" a field which contains only 'the name of the city and the state'

    without any concatenation.

    Because I hope to find a "mouseover" solution to display that information

    (exactly like on google maps)

    Location is got with lat/long
    If I let a " ' " the list view hangs
    So Needs??

  • modifiable zoom ratio
  • several markers (to distinguish some categories...) and perhaps put our own markers?
  • display the "location's title" in a "bubble" on the mouseover...
    Kjp

K
kjp 1/17/2010

A link to got GMaps Latitude & Long anywhere...
http://pagesperso-orange.fr/universimmedia/geo/loc.htm
HTH
Kjp

C
copper21 author 1/17/2010

kjp,
Yes, the way I described makes the zoom feature the same for both of the maps; the single record and the multiple records. I agree, it would be nice in a future build to be able to set a zoom for each of the maps.
I too have hang-ups using the map feature. The problem that I have come into is when I try to add a details record under the master record, it continues to say "loading" This only happends when there are no existing details record. If I insert a record manually, there is no problem and I can continue to add other records. I think that this might be an IE 8 compatability issue because I have tried on prior IE versions and it works fine. I do only use the "address" filed when doing this. I had seen an earlier post by Jane, http://www.asprunner.com/forums/topic/13414-phpr-5-2-google-maps/pagehlgoogle%20mapsfromsearch1, that all fields should be used, lat & lon, but I am not sure that is the issue. I think that most of the errors are coming from the "gmap.js" file.
The last thing is that I am still looking on how to place a description onto the widget; that is when you mouseover the widget, it gives a brief explaination on what record that represents. Any ideas kjp, Sergey, or Jane?
Thanks for the help by all.
Brian

Admin 1/18/2010

Brian, kjp,
we'll include zoom and marker description feature in the final version.
Brian,
you do not need to fill both address and lat/lon fields. Without seeing your application it's hard to tell what exactly might be wrong. I recommend to post your app to demo account and open a ticket at http://support.xlinesoft.com sending your application URL.

W
wrjost 1/18/2010



A link to got GMaps Latitude & Long anywhere...
http://pagesperso-orange.fr/universimmedia/geo/loc.htm
HTH
Kjp


Here is my favorite
http://www.mapchannels.com/GeocoderSimple.aspx
Greetings,

Wilfried

K
kjp 1/18/2010

YES!!
Now it's mine too!!
Very great, thanks for sharing
Kjp