Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Mats

  1. Thanks for the report Beluga. I'll look into it.
  2. Glad you got it sorted, i had the same issue at some point.
  3. Hi! Here's the solution: https://processwire.com/talk/topic/9827-single-image-upload-on-frontend-doesnt-work-correctly/
  4. Something like this? http://ipicture.justmybit.com/demo/ipicture-cars-demo.php https://github.com/jamietre/ImageMapster Could be a useful fieldtype.
  5. Here's the code: function convertGeoToPixel($lat, $lon) { $mapWidth = 38; $mapHeight = 109; $mapLonLeft = 16.37007904846189; $mapLonRight = 17.151481636352514; $mapLonDelta = $mapLonRight - $mapLonLeft; $mapLatBottom = 56.1947686858922; $mapLatBottomDegree = $mapLatBottom * M_PI / 180; $x = ($lon - $mapLonLeft) * ($mapWidth / $mapLonDelta); $lat = $lat * M_PI / 180; $worldMapWidth = (($mapWidth / $mapLonDelta) * 360) / (2 * M_PI); $mapOffsetY = ($worldMapWidth / 2 * log((1 + sin($mapLatBottomDegree)) / (1 - sin($mapLatBottomDegree)))); $y = $mapHeight - (($worldMapWidth / 2 * log((1 + sin($lat)) / (1 - sin($lat)))) - $mapOffsetY); return array($x, $y); } $pposition = convertGeoToPixel($pl->map->lat, $pl->map->lng); echo "<div class='litenkarta'><div class='punkt' style='left: {$pposition[0]}px; top: {$pposition[1]}px; '></div></div>";
  6. Hi Rick! I use InputfieldMapMarker for the lat/lng coordinates (used for google/mapbox maps mainly) and the code from the SO link to convert the lat/lng to x/y pixel coordinate dynamicly. I'm only using the conversion on one image but i guess you could use $image->width $image->height to make it work with uploaded images.
  7. I'm using this code and the InputfieldMapMarker to mark positions on an image. You can see it in action here (the small blue images with a white dot): http://alltpaoland.com/
  8. Change the module file from .php to .module.
  9. The search seems to be using this: http://www.runningcoder.org/jquerytypeahead/
  10. Corrected code: $q = $sanitizer->text($input->get->q); if($q) { $input->whitelist('q', $q); $qs = explode(" ", $q); foreach($qs as $key => $q){ $qs[$key] = $sanitizer->selectorValue($q); } $selector = "title|body|interests*=" . implode("|", $qs) . ", limit=50"; if($user->isLoggedin()) $selector .= ", has_parent!=2"; $matches = $pages->find($selector); if($matches->count) { $content .= "<h2>Found $matches->count pages matching your query:</h2>"; $content .= renderNavPanel($matches); } else { $content = "<h2>Sorry, no results were found.</h2>"; } } else { $content = "<h2>Please enter a search term in the search box (upper right corner)</h2>"; }
  11. Check this out: https://processwire.com/talk/topic/9234-search-for-partial-words-in-any-positionorder/
  12. This module renders a download link for imagefields. https://github.com/madebymats/ImageDownload
  13. @rick: Check out the thread kyle mentions in the op: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=19547
  14. Thanks for the heads-up! Since it's a beta i will wait until it's more stable and Marker cluster plug in is compatible with the new version.
  15. Leaflet is indeed very nice. I did a leaflet version of Ryans Google maps module. (Includes cluster functionality). Example here: http://tegelwebb.se/leaflet-map-test/ Here's the link to the module: https://github.com/madebymats/FieldtypeLeafletMapMarker-
  16. I don´t think you should have a index.html file in your site/templates folder. Only the template files, home.php etc. If you have a dot in the url the page will be routed to the home page. That's my experience wit dots in urls anyway.
  17. @iNoize: Did you try this for custom markup? https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=19547 And this for custom class names: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=22191
  18. Hi Navid! What error message do you get when trying to log in again?
  19. I think the providers can be a part of the module as long as one can choose from others providers like Mapbox. Awesome markers support will be awesome!
  20. You've put the script in the <body>. Put it in the <head> instead: <head> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> </head>
  21. That's great Gebeer! I created a thread for the Leaflet version here.
  22. This is a Leaflet version of Ryans Google Maps marker module. @Github
  23. Mats

    Poll site

    Today Kalmar County Museum released a small campaign site where people can vote for their favorite building in the city of Kalmar (Sweden). The site uses latest PW dev version and Somas excellent Pollino module. The maps are powered by Leaflet and map tiles are from Mapbox. http://kvarnholmen.kalmarlansmuseum.se/
  24. Thanks for building this module Soma! And the detailed documentation is very helpful. I'm using it on a small campaign site here: http://kvarnholmen.kalmarlansmuseum.se/
  25. I think the category is a Pagefield.
  • Create New...