kixe Posted May 23, 2014 Posted May 23, 2014 Just to know: Map Marker Fieldtype doesn't work together with Firefox- Add-on: HTTPS Everywhere.(Version: Firefox 28.0 Mac, HTTPS Everywhere 3.5)
adrian Posted May 23, 2014 Posted May 23, 2014 Just to clarify, it is the google map itself that is not working - the issue is not specific to this PW fieldtype. Take a read of the comment by patrickjdempsey in this thread: http://forums.mozillazine.org/viewtopic.php?f=38&t=2440619 1
charger Posted May 31, 2014 Posted May 31, 2014 I am currently using the RCD map class by Ryan (see post 18 of this thread) which happily accepts anchor tags for the marker URL like so: $js .= "\nRCDMap.addMarker('{$marker->title} ({$marker->parent->title})', '#{$marker->parent->title} {$marker->title}', {$marker->map_marker->lat}, {$marker->map_marker->lng});"; How do I achieve the same with MarkupGoogleMap as the markerLinkField only accepts a page field? Thanks! UPDATE: Managed to do it using http://modules.processwire.com/modules/fieldtype-concat/ Would you mind sharing your solution? I'm in the same boat and don't know exactly how to achieve this with the fieldtype concat. What I'd like to achieve is an anchor like this: #target_name However, the field name has an output of "name", not the actual page name. The same happens with these fields as well: id, path, url, template
hellomoto Posted June 24, 2014 Posted June 24, 2014 I followed the module implementation instructions and I'm not getting a map, just a blank canvas... and an Uncaught TypeError: Cannot read property 'lat' of null. Any ideas..?
dazzyweb Posted July 29, 2014 Posted July 29, 2014 For anyone that has the map hidden initially before being opened resulting in bad rendering of the map. I tried the following that was mentioned here on this post but with no success. setTimeout(function() { google.maps.event.trigger(mgmap1, 'resize'); mgmap1.map.setCenter(mgmap1.options.center); }, 250); After a while(2 hours ) scratching my head I changed it to the following: setTimeout(function() { google.maps.event.trigger($("#mgmap1")[0], 'resize'); mgmap1.map.setCenter(mgmap1.options.center); }, 250); Now works perfectly. 9
sins7ven Posted August 30, 2014 Posted August 30, 2014 Is it possible to create custom markers? I have around 20 markers and want to show them as numbered coloured dots on the map. Its basically just a red spot (all CSS, no images) with the number right in the middle. Not sure if this has already been asked here before. Anyone else tried this before?
adrian Posted August 30, 2014 Posted August 30, 2014 Is it possible to create custom markers? This is not really PW related. Some googling should get you going. https://developers.google.com/maps/tutorials/customizing/custom-markers
bwakad Posted August 30, 2014 Posted August 30, 2014 I wanted to use PW mapmarker.... but for frontend what I needed it was not suited. I now use geocomplete from ubilabs for frontend. Looks great, works excellent. The google api3 docs have an excellent video on retrieving addresses. So in my form I have 1 autocomplete address field that catches Country, State and City level (I explicitly set it to real addresses, NOT from hotels or anything) and use those values to populate fields for members. If any is missing, it would not be valid. Yes, I could use a dropdown (thousands of cities), or use a input field (no way to validate). So this was a good solution. 1
BFD Calendar Posted September 15, 2014 Posted September 15, 2014 The South Pole doesn't show up in MapMarker.... http://www.birthfactdeathcalendar.net/places/the-south-pole-polheim/ It also prevents the map showing up in an array of posts. http://www.birthfactdeathcalendar.net/events/dates/december/14-december/
gebeer Posted September 17, 2014 Posted September 17, 2014 The South Pole doesn't show up in MapMarker.... http://www.birthfactdeathcalendar.net/places/the-south-pole-polheim/ In the console I see this error: NetworkError: 404 Page Not Found - http://www.birthfactdeathcalendar.net/wire/modules/FieldtypeMapMarker/InputfieldMapMarker.js?v=203?%3E" Is that page published?
BFD Calendar Posted September 18, 2014 Posted September 18, 2014 In the console I see this error: NetworkError: 404 Page Not Found - http://www.birthfactdeathcalendar.net/wire/modules/FieldtypeMapMarker/InputfieldMapMarker.js?v=203?%3E" Is that page published? Uhm, published.... I guess not. All other locations show up with the same settings however.
rizsti Posted October 31, 2014 Posted October 31, 2014 I'm having trouble with removing the fit to markers functionality when using multiple markers. I've read through some of the previous post on the subject and Ryan seemed to indicate that I needed to use 'new PageArray()'? I tried what BFD Calendar did, and this resulted in the proper zooming and lat and long, but no markers. echo $map->render(new PageArray($pages->find("template=bfd_places, MapMarker!=''")), 'MapMarker', array('height' => '400px', 'zoom' => '2', 'lat' => '50.923813', 'lng' => '4.431493')); I also tried: <?php $markers = new PageArray(); foreach ($page->children() as $c) { $markers->add($c); } echo $map->render($markers, 'loc_mapmarker_map', array( 'fitToMarkers' => 'false', 'id' => 'newmap', 'type' => 'ROADMAP', 'icon' => '/site/templates/styles/images/pin.png', 'height' => '583', 'lat' => '49.8602016', 'lng' => '-97.1510875', 'zoom' => '10', )); ?> Which resulted in it fitting to the markers again. Any help would be appreciated. Thanks, Riz
BFD Calendar Posted October 31, 2014 Posted October 31, 2014 Riz, it took me a while to get things going. Here's the (working) code I use on my home template: // MAP echo "<div style = 'width:85%'><br>"; $landmarks = $pages->find("parent=/events/|/the-eyes/, bfd_month.name=$month, bfd_day.name=$day, sort=bfd_day, sort=bfd_year, sort=name"); $markers = new PageArray(); foreach($landmarks as $landmark) { $myentry = $landmark->bfd_events_places_id_list; $myentry->markerUrl = $landmark->url; $myentry->markerTitle = $landmark->title; $markers->add($myentry); } if ($markers && $landmark->bfd_day) { $map = $modules->get('MarkupGoogleMap'); $options = array('width' => '100%', 'height' => '500px', 'markerLinkField' => 'markerUrl', 'markerTitleField' => 'markerTitle'); echo $map->render($markers, 'MapMarker', $options); } else { echo ""; }; ?> </div> "bfd_events_places_id_list" is a page field in every "event" template. It refers to pages that have the actual MapMarker field and other info as well (placename, street, district, city, state, country,...). Maybe you can adapt it to your situation. And probably some guys here can smooth it all out or compact it. DDV 1
pwFoo Posted November 17, 2014 Posted November 17, 2014 I like this flexible gmap module. Is it possible to (auto) show also the gmap info box (address, website link, ...) provided by gmaps?
davo Posted November 19, 2014 Posted November 19, 2014 This module has settled in well to my live site. However, the client often presents the site 'offline'. To do this the client has made a copy of the site using httptrack. It's not my ideal solution but suits the client well. The problem is when the site tries to load a page with the map marker displayed they get this error: "Markup Google map error please add the maps.googleapis.com in your document head". Is there a possible way around this? Any suggestions welcome....
adrian Posted November 21, 2014 Posted November 21, 2014 This module has settled in well to my live site. However, the client often presents the site 'offline'. To do this the client has made a copy of the site using httptrack. It's not my ideal solution but suits the client well. The problem is when the site tries to load a page with the map marker displayed they get this error: "Markup Google map error please add the maps.googleapis.com in your document head". Is there a possible way around this? Any suggestions welcome.... It might be possible to cache the tiles, but from a little reading, it sounds like that would be against the TOS: https://groups.google.com/forum/#!topic/google-maps-js-api-v3/sALpJq12HjQ It might be easier if you were using the google static maps API: https://developers.google.com/maps/documentation/staticmaps/ although this still might not be allowed (I haven't checked).
awebcreature Posted December 29, 2014 Posted December 29, 2014 Hello there! Is it possible to add drawing tools to the module? https://developers.google.com/maps/documentation/javascript/examples/drawing-tools On the current project i need to draw polygon on the map and save to DB for later use in front-end. What changes are needed? Thanks in advance!
hellomoto Posted January 4, 2015 Posted January 4, 2015 I don't understand why my MarkupGoogleMap won't work... I tried following the Skyscrapers example first, with RCDMap.js etc., that didn't work; so now I'm trying this MarkupGoogleMap and I get a blank map with just a gray background. In my head element, I have: <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script> and this snippet in my listing page template: $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'map_location'); and I just get a blank map canvas. No errors in JS console. Anyone know how I might get this to work? Thanks... Although, I've been skimming through this thread, and I'm very interested possibly trying to implement something like what Bwakad did, with Geocomplete... mentioned here. There's the first benefit of having the input validation taken care of, and then also what I'd like to do, I don't know if it can be done using this but I would like ultimately for the listings to be searchable, by proximity... not just location. Like for the visitor to be able to choose "10" or "50 miles from {$location}". Anyone know how this might be achieved? But for now just the maps would be nice.
hellomoto Posted January 4, 2015 Posted January 4, 2015 Oh well here's something on searching by proximity from Google: https://developers.google.com/maps/articles/phpsqlsearch_v3
hellomoto Posted January 4, 2015 Posted January 4, 2015 I can't get this to work for the life of me. I've tried literally everything, everyone's snippets. I'm on localhost, PW 2.5.3. The closest I managed to get is a shot of the whole world, or a relative close-up of the correct location, without the ability to drag and see anything around it, and sans marker.
seddass Posted January 4, 2015 Posted January 4, 2015 I can't get this to work for the life of me. I've tried literally everything, everyone's snippets. I'm on localhost, PW 2.5.3. The closest I managed to get is a shot of the whole world, or a relative close-up of the correct location, without the ability to drag and see anything around it, and sans marker. Repeating "I can't" wouldn't help. It will be great if you change your mindset and look for some javascript errors in the browser console or in the code. Don't just copy/paste "everyone's snippets" but try to understand what they are doing. I can confirm that this module is working and used by hundreds. This is all I can say based on your "I can't". Peace! 2
hellomoto Posted January 10, 2015 Posted January 10, 2015 $page->set($fieldName->address, $value); does not seem to work.
teppo Posted January 10, 2015 Posted January 10, 2015 How 'bout simply doing this? $page->$fieldName->address = $value; See Ryan's first post in the Map Marker Fieldtype thread for usage examples.
hellomoto Posted January 17, 2015 Posted January 17, 2015 Ah yes it works! Thank you I didn't even know you could string variables like that!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now