-
Posts
360 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Mats
-
Something like this? http://ipicture.justmybit.com/demo/ipicture-cars-demo.php https://github.com/jamietre/ImageMapster Could be a useful fieldtype.
-
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>";
-
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.
-
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/
-
Change the module file from .php to .module.
-
The search seems to be using this: http://www.runningcoder.org/jquerytypeahead/
- 11 replies
-
- 2
-
-
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>"; }
-
Check this out: https://processwire.com/talk/topic/9234-search-for-partial-words-in-any-positionorder/
-
This module renders a download link for imagefields. https://github.com/madebymats/ImageDownload
-
@rick: Check out the thread kyle mentions in the op: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=19547
-
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.
-
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-
-
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.
- 11 replies
-
- home.php
- navigation
-
(and 1 more)
Tagged with:
-
@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
-
Hi Navid! What error message do you get when trying to log in again?
-
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!
-
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>
-
That's great Gebeer! I created a thread for the Leaflet version here.
-
This is a Leaflet version of Ryans Google Maps marker module. @Github
-
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/
-
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/
-
I think the category is a Pagefield.
-
Net magazine is doing a CMS poll. Seems like you can vote multiple times which could make the poll a bit misleading. https://docs.google.com/forms/d/1QH9axSE7sS1B56KSxzVVzwE9Hg0gPiSNSvMy_ZFqRMM/viewform https://twitter.com/netmag/status/578594852524417024
-
- 4
-
-
http://kenwheeler.github.io/slick/
-
If you change the zoom to an integer? $options = array('zoom' => 7, 'height' => '700px');