Google Map not sowing in pawtuket2

I have added  google map key in providence setup and pawtucket2 setup file. This application has been setup locally on windows. Please help me how to show google map and how it to process add objects to show google map. 


Comments

  • I had to add it to "app/conf/assets.conf" in order to get it to work.

            # -----------------------
            google = {
                    maps = https://maps.googleapis.com/maps/api/js?key=MYKEY:20,
                    markerclusterer = markerclusterer.js:20,
                    geolocationmarker = geolocationmarker.js:20

    Doug
  • Hi loubert,

    I have checked map page (http://localhost:8082/providence/pawtucket2/index.php/Browse/objects) and saw it source code. latitude and longitude of objects are not showing in scripts after adding georeference code in providence. 

    Please help me for showing caMap_map.makeMarker with latitude and longitude.


     





  • Not sure what you mean and the link you had is for localhost so I could not go look. For me, (ver1.6.1 and testing 1.7.6), once I put my key for Pawtuket in "app/conf/assets.conf", my maps show up. Putting it setup.php did not work for me in either Pawtuket or Providence.

    Here is a working example.

    http://kammerzellsommer.dyndns.org/index.php/Detail/objects/149

    Doug
  • To map browse results you must configure the georeference metadata element in your theme's browse.conf file.  Here is an example configuration (line 22): https://github.com/collectiveaccess/pawtucket2/blob/master/themes/default/conf/browse.conf  where "data" is set to the <tablename>.<elementcode> of the metadata element that has the coordinates.
  • In browse conf file, I have used this below configuration but this is not showing map.

    browseTypes = {
        objects = {
            displayName = _(Objects),
            labelSingular = _("object"),
             labelPlural = _("objects"),
            table = ca_objects,
           
            restrictToTypes = [],
            #dontExpandTypesHierarchically = true,
            availableFacets = [],
           
            # formats available for display of results
            # possible values are: images, list, timeline, map
            views = {
                images = {},
                list = {},
                map = {
                    data = ca_objects.georeference,
                    display = {
                        title_template = <l>^ca_objects.preferred_labels.name</l> (^ca_objects.idno),
                        description_template = <p>^ca_objects.description</p>,
                        icon = <div style='float:left; margin:0px 10px 10px 0px;'>^ca_object_representations.media.icon</div>   
                    }
                },

    Please help me, what need to be changes for georeference. 


  • That looks like the default configuration.  You need to make sure that "georeference" is the element code of the metadata attribute on your object form and that you have entered information in that field on your object records.  You can look up element codes by navigating to Manage > Administration > Metadata elements and you can add metadata elements to your object form by navigating to Manage > Administration > User Interfaces.
  • Thank You Maria, This is working now.
  • Great!  Happy to help!
  • Following this thread, I could get my "georeference" user interface working in my providence back end. How can I make this map available for front-end users of pawtucket, as shown in loubert's example link? I also want to know how that "Citing this Record" link can be added.

Sign In or Register to comment.