We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32083
    • 5 Posts
    Quote from: coroico at May 12, 2011, 02:19 AM

    You are lucky, because your example works.
    At first it didn’t work but then I noticed both maps got the same default id (Gmaps).
    Litte typo there, the variable name is mapId not mapid. After that, it worked!
    Thanks for your help!
      • 5811
      • 1,717 Posts
      the variable name is mapId not mapid
      You are right. I noticed this but forgot to tell you!
      This typo in the cheatsheet document will be fixed with the next release.
        • 7455
        • 2,204 Posts
        Would be nice if we could inserd an adress instead of lat en lng

        Dimmy
          follow me on twitter: @dimmy01
          • 18463
          • 121 Posts
          Martijn van Turnhout Reply #54, 15 years, 4 months ago
          Agreed, that would be even more efficient. Instead of having 2 lat and long TV’s, you can have only 1 have "address" TV. Is that possible?
            • 36805
            • 354 Posts
            Quote from: Martijn at May 16, 2011, 04:01 AM

            Agreed, that would be even more efficient. Instead of having 2 lat and long TV’s, you can have only 1 have "address" TV. Is that possible?
            It is possible to geocode an address to latitude longitude by the google api. However not all markers have an address to geocode. Imagine a photo database where you put you landscape photo locations for example.
              • 18463
              • 121 Posts
              Martijn van Turnhout Reply #56, 15 years, 4 months ago
              So an optional "address" TV would be possible then? If you want to take the chance that all your markers have a geocoded address that is.
                • 36805
                • 354 Posts
                I understand this addon requires manually typing a latitude and longtitude.

                I’d like to have a revo widget for picking the location like evo has. Unfortunately I wouldn’t know where to start developing it. It would ease adding markers a lot for endusers.

                I tried the evo addon and it’s great. It also handles addresses very well by searchbox which scrolls there. It can pick a latitude, longtitude by double clicking somewhere on the map.
                  • 36805
                  • 354 Posts
                  Quote from: Martijn at May 18, 2011, 07:20 AM

                  So an optional "address" TV would be possible then? If you want to take the chance that all your markers have a geocoded address that is.
                  In theory yes. I don’t know about the inner workings of the Gmaps addon but the google api allows it.

                  If anyone is interested I got a google maps v3 javascript which outputs a single marker based on address paremeters which it geocodes. It is based on the api docs and pretty simple actually. Its not for modx but for a smarty application but could be adapted.
                    • 5811
                    • 1,717 Posts
                    @Martijn
                    Agreed, that would be even more efficient.
                    It will not be more efficient.
                    1/ The geocoding process require to ask on fly to a google server the translation Address => lat,lng. So this consume performances. It could be acceptable for few markers not for lot of markers.
                    2/ with an undetailed adress you can get several answers huh

                    Instead of having 2 lat and long TV’s, you can have only 1 have "address" TV
                    Gmaps use only one tv: LatLngTv. Not 2. And for the geocoding you usually need an address AND a latLng value. In this case the latLng is the point the closest of your address. See the geocoding api

                    The GeocodeRequest object literal contains the following fields:
                    
                    {
                     address: string,
                     latLng: LatLng,
                     bounds: LatLngBounds,
                     language: string,
                     region: string,
                    }
                    
                    These fields are explained below.
                    
                        address (required*) — The address which you want to geocode.
                        latLng (required*) — The LatLng for which you wish to obtain the closest, human-readable address.
                        bounds (optional) — The LatLngBounds within which to bias geocode results more prominently. (For more information see Viewport Biasing below.)
                        language (optional) — The language in which to return results.
                        region (optional) — The region code, specified as a IANA language region subtag. In most cases, these tags map directly to familiar ccTLD ("top-level domain") two-character values. (For more information see Region Code Biasing below.)



                    So, I probably add an addressTv. And the location of the marker will be deducted from the Address + latLng. But if the address is blank then I will use the latLngTV.

                    IMHO, for a map to show the location of one or two markers with an itinerary, for instance, I suggest that someone upgrade the googleMapTv to the API V3. I think It will be more adapted than Gmaps.

                      • 6537
                      • 70 Posts
                      Hi,

                      Is anyone having problems with zoom and markers? I’m finding that regardless of what I set the zoom to, the map always displays as shown in the attached screenshot - zoomed right out so far that you can see 2 copies of the markers.

                      Any ideas (this is on Evo)?
                      Thanks